I am creating an Excel document using OpenXML in a C# webrform project.
In one cell I input an ID, and in some cases multiple IDs separated by commas similar to this:
**ID1** **ID2**
10756409 3090,3093,3130
10776516 3105
10806938 3123
10817453 3090,3093,3100
Each cell in both columns are given CellValues.String DataType.
When I open the spreadsheet I get the "Found a problem with content. Would you like us to recover..." warning.
When I click yes, the data is fine, but the cells with CSV values are left justtified (as opposed to right justified for the non-CSV values) have the green corner and say The number in this cell is formatted as text or preceded by an apostrophe.
How can I get the Excel to open without the warnings?
'before content for the cells you need it to be treated as text. - Abbas