Tag: #data-format
5 articles
-
Excel Number Format Codes, Decoded — #,##0, [Red], ;;; and K/M Suffixes in a C# App
#,##0;[Red]-#,##0;"-" looks like line noise, but it is a small language — four sections, digit placeholders, colors, conditions and literal text — and once you can read it you can write the code you actually need. This guide decodes Excel's custom number formats: thousands and millions scaling, hiding values, units, [h]:mm for timesheets, and why three cells showing 33 can total 100. Then it applies the same codes in C# with ReoGrid V5, where a code copied out of Excel works as-is and survives the trip to XLSX.
-
When Search and Deduplication Quietly Fail on Japanese Data — Normalizing Full-Width / Half-Width Text in a C# App
An address in half-width kana, a phone number in full-width digits, the same company filed twice as "(株)" and "(株)" — Japanese input data mixes full-width and half-width characters, and as-is, search, deduplication, and totals all silently break. With ReoGrid you can bulk-convert using the Excel-compatible JIS / ASC functions, and auto-normalize on entry via AfterCellEdit. Build business data in C# that holds up against width inconsistency.
-
Stop Invoice Totals From Drifting by a Yen — Currency Formatting, Consumption Tax, and Rounding in C# with ReoGrid
Hold money in a double and you get rounding error; turn it into a string and totals and sorting break; round consumption tax in the wrong place and your invoice is off by a yen. Money breaks in business apps for predictable reasons. With ReoGrid, cell data stays numeric while it displays as ¥1,234,567 — and reduced-rate (8%/10%) subtotals and invoice-compliant rounding are just formulas.
-
Stop CSV Data From Being 'Fixed' When Opened in Excel — Control Encoding and Column Types in Your C# App
ZIP code 01950 becomes 1950, product code 1-2-3 becomes a date, and a UTF-8 file shows up as garbled text — CSV breaks because the file carries no type information and whatever opens it guesses. In your own app, you declare the encoding and the per-column types. Build a CSV viewer / importer in C# with ReoGrid that keeps your data intact.
-
Japanese Era (Wareki) Date Cells in C# — Display 令和8年6月6日 While the Data Stays a DateTime
Invoices, contracts, birthdates — apps for the Japanese market must show dates in the era calendar (Reiwa, Heisei, Showa). Convert to strings and you break sorting and formulas. With ReoGrid, one format pattern shows wareki while every cell keeps a real DateTime.