将excel保存为xml时保留空单元格

时间:2022-09-11 21:48:34

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

我有一个excel文档,其中一些单元格是空的当我将excel保存为xml spreadcheet时,我得到的行只有具有数据的单元格并且空单元格消失(并且后面的单元格获得一个索引属性以指示他的真实有没有办法将excel保存在xml中并且空单元格可以节省空间?我在xml上运行xsl,即使它是空的,也需要知道一个单元格的值

4 个解决方案

#1


0  

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.

从您的问题来看,目前尚不清楚您是在讨论数据中的空单元格还是数据外的单元格。如果你在谈论数据区域之外的空单元格,那么你可以做的事情并不多,因为它实际上是无限数量的单元格。如果您想要有更多的单元格或行,您可以随时在导入后填充单元格。

#2


2  

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. 在Excel中选择映射区域并打开使用Excel的查找/替换工具。

  3. Leave the "Find What" field blank.
  4. 将“查找内容”字段留空。

  5. Enter a single quote in the "Replace With" field.
  6. 在“替换为”字段中输入单引号。

  7. Press Replace All and re-export to XML. All field should show now.
  8. 按全部替换并重新导出到XML。现在应该显示所有字段。

#3


0  

Just type spaces in the cells you want to preserve.

只需在要保留的单元格中键入空格即可。

#4


0  

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

只需将char'放入单元格中,即可导出xml标记。

#1


0  

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.

从您的问题来看,目前尚不清楚您是在讨论数据中的空单元格还是数据外的单元格。如果你在谈论数据区域之外的空单元格,那么你可以做的事情并不多,因为它实际上是无限数量的单元格。如果您想要有更多的单元格或行,您可以随时在导入后填充单元格。

#2


2  

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. 在Excel中选择映射区域并打开使用Excel的查找/替换工具。

  3. Leave the "Find What" field blank.
  4. 将“查找内容”字段留空。

  5. Enter a single quote in the "Replace With" field.
  6. 在“替换为”字段中输入单引号。

  7. Press Replace All and re-export to XML. All field should show now.
  8. 按全部替换并重新导出到XML。现在应该显示所有字段。

#3


0  

Just type spaces in the cells you want to preserve.

只需在要保留的单元格中键入空格即可。

#4


0  

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

只需将char'放入单元格中,即可导出xml标记。