任何人都可以通过单击按钮通过VBA将XLSX转换为XML的宏帮助我吗? 数据中会有节点,您可以从下面的示例中寻求帮助 (也可以只使用结束标记查看xml中的空白值生成) 例如:-
Sheet 1 contains the following data
Column 1 Column 2 Column 3 Column 4
Row 1 Data\School\Name Data\School\Area Data\Affiliation\Type Data\Affiliation\Code
Row 2 ABC Pune CBSE 001
Row 3 XYZ Blank ICSE 002
转换后的XML文件
<Data><School><Name>ABC</Name><Area>Pune</Area></School><Affiliation><Type>CBSE</Type><Code>001</Code></Affiliation></Data><Data><School><Name>XYZ</Name></Area> (Notice Here Only the end tag is here as there is no data in the sheet for area in the 2nd row)/School>
<Affiliation><Type>ICSE</Type><Code>002</Code></Affiliation></Data>
转换后,我无法获得具有空白值XML文件的变量的空标记