0

I am trying to set the exported file format as Text.

Currently even if It set the cell values to string it shows as general in the exported file.

I tried to set style index 0 still didn't help.

I want to set the cells as text instead of general. enter image description here

Code used from here : https://learn.microsoft.com/en-us/office/open-xml/how-to-create-a-spreadsheet-document-by-providing-a-file-name

  • I guess it would be identical, to how it is done in vba: https://stackoverflow.com/questions/8265350/how-to-change-format-of-a-cell-to-text-using-vba – Rand Random Jan 24 '23 at 15:56
  • Text is text, not Open XML. `xlsx` files are OpenXML. The `xlsx` files used by Excel are ZIP packages containing XML files according to the OpenXML format. Not a single XML file and definitely not a text file – Panagiotis Kanavos Jan 24 '23 at 15:58
  • Text files have no styles either. They contain text, generated using the styles and settings specified by the user when he/she exported the Excel file as Text. When those text files are imported back into Excel, the user can specify that some of them will be parsed as dates, numbers or remain text. – Panagiotis Kanavos Jan 24 '23 at 15:59

0 Answers0