{"slug": "test-long-comment-ids-before-joining-a-csv-in-excel", "title": "Test Long Comment IDs Before Joining a CSV in Excel", "summary": "A developer writing for tokviewer.app's editorial team published a guide showing how Excel's 15-significant-digit numeric precision limit silently corrupts 19-digit comment identifiers during CSV imports, causing distinct IDs to collapse into the same number and breaking parent-reply joins. The guide recommends importing IDs as text via Power Query's Text/CSV path, removing automatic Changed Type steps, and validating cells with ISTEXT and EXACT checks against an untouched plain-text reference. It also advises keeping identifiers as strings through JSON parsing, storage and serialization in developer pipelines, since a final string conversion cannot repair upstream rounding.", "body_md": "Disclosure: I write for the tokviewer.app editorial team. This tutorial was prepared with AI assistance. All example identifiers and comments below are invented test fixtures, not records collected from TikTok.\n\nA comment export can look readable while its identifiers are already damaged. That becomes visible when you join replies to parent comments or remove duplicates: two IDs that differ near the end may collapse into the same spreadsheet number.\n\nMicrosoft documents Excel's [15-significant-digit numeric precision limit](https://learn.microsoft.com/en-us/troubleshoot/microsoft-365-apps/excel/floating-point-arithmetic-inaccurate-result). Identifiers should enter the spreadsheet as text. Widening the column or changing a damaged cell to Text does not restore digits that were lost earlier.\n\nUse two invented IDs differing only in their last digit:\n\n```\ncomment_id,parent_comment_id,comment\n1234567890123456788,,Fictional parent question\n1234567890123456789,1234567890123456788,Fictional reply\n```\n\nBoth IDs have 19 digits. Their length is a property of this fixture, not a universal rule for every TikTok identifier. The fixture tests whether the import preserves the distinguishing suffix and the parent relationship.\n\nKeep an untouched reference in a plain-text editor. Do not open and resave that reference through Excel before using it for comparison. Quoting digit strings in CSV would not solve the typing problem: CSV quotation marks delimit a field, but they do not declare an Excel column as text.\n\nIn desktop Excel with the Text/CSV Power Query importer, open a blank workbook and choose **Data > From Text/CSV**. Select the fixture and use **Transform Data** to inspect the conversion steps before loading.\n\nIf an automatic **Changed Type** step turns the identifiers into numbers, remove that step before setting `comment_id` and `parent_comment_id` to **Text**. Assigning Text after numeric conversion can preserve an already rounded value. Keep the comment column as text too.\n\nLoad the table at A1 for the checks below, with headers in row 1. If your Excel edition lacks that import path, use a native workbook export that writes identifier cells as strings, when available, and still validate it. A workbook extension by itself does not establish correct cell types.\n\nEnter these checks in spare cells outside the imported table:\n\n```\n=ISTEXT(A2)\n=ISTEXT(A3)\n=EXACT(A2,\"1234567890123456788\")\n=EXACT(A3,\"1234567890123456789\")\n=EXACT(A2,A3)\n=EXACT(B3,A2)\n```\n\nExpected results are `TRUE`, `TRUE`, `TRUE`, `TRUE`, `FALSE`, `TRUE` in that order. They are expectations for the fixture, not an account of an executed Excel session. Some locale settings use semicolons between formula arguments.\n\nKeep the reference IDs quoted in formulas. Otherwise the test literal itself can become a spreadsheet number. Microsoft describes [EXACT as a comparison of text strings](https://support.microsoft.com/en-us/excel/functions/exact-function), so pair it with a cell-type check and an independently preserved source.\n\nThe final parent-link check is useful but insufficient alone. It could pass if both the parent ID and its reference were damaged identically. Comparing against the original strings catches that shared error.\n\nValidate `comment_id`, `parent_comment_id` and `video_id` as strings before joins. Keep count fields numeric where arithmetic is appropriate. Preserve missing IDs as missing; a local display label or a guessed suffix is not a platform identifier.\n\nRepeat the checks after saving and reopening the workbook. Saving back to CSV removes workbook type information, so the next import needs the same precautions. For developer pipelines, keep IDs as strings during JSON parsing, storage and serialization as well; a final string conversion cannot repair upstream rounding.\n\nThe [full comment-ID import guide](https://tokviewer.app/blog/keep-tiktok-comment-ids-intact-in-excel/) includes the practice file and product-specific export details. Passing these checks establishes record identity within the file. It still does not prove that the capture includes every comment or reply on its source video.", "url": "https://wpnews.pro/news/test-long-comment-ids-before-joining-a-csv-in-excel", "canonical_source": "https://dev.to/tokviewerapp/test-long-comment-ids-before-joining-a-csv-in-excel-4lek", "published_at": "2026-10-02 04:43:55+00:00", "updated_at": "2026-10-02 05:14:40.922313+00:00", "lang": "en", "topics": ["structured-data", "developer-tools"], "entities": ["Excel", "Microsoft", "Power Query", "tokviewer.app", "TikTok"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/test-long-comment-ids-before-joining-a-csv-in-excel", "markdown": "https://wpnews.pro/news/test-long-comment-ids-before-joining-a-csv-in-excel.md", "text": "https://wpnews.pro/news/test-long-comment-ids-before-joining-a-csv-in-excel.txt", "jsonld": "https://wpnews.pro/news/test-long-comment-ids-before-joining-a-csv-in-excel.jsonld"}}