Home » excel » preserve empty cells when saving excel as xml

preserve empty cells when saving excel as xml

Posted by: admin April 23, 2020 Leave a comment

Questions:

I have an excel document where some of the cells are empty
When i save the excel as xml spreadcheet i get the row with only the cells that have data and and the empty cells disapear (and the following cell gets an index attribute to indicate his true position)
Is there a way to save the excel in xml and have the empty cells apear insted of saving space ?
I am running xsl on that xml and need to know the value of a cell exactly even if its empty

How to&Answers:

From your question it is not clear if you are talking about empty cells within the data or cell outside the data. If you are talking about empty cells outside of the data area than there is not much you can do since it is effectively an infinite number of cells. You could always simply pad the cells after importing if you want to have more cells or rows.

Answer:

I simply put a single quote in the empty cell –> ‘.

  1. Select the mapped area in Excel andopen use Excel’s Find/Replace facility .
  2. Leave the “Find What” field blank.
  3. Enter a single quote in the “Replace With” field.
  4. Press Replace All and re-export to XML. All field should show now.

Answer:

Simply put the char ‘ into the cell and the xml tag is exported.

Answer:

Just type spaces in the cells you want to preserve.