When I tried to open testdroplist.xlsx with Excel, the following error was thrown: "An error was detected in testdroplist.xlsx, the replaced part: /xl/worksheets/sheet1.xml with xml error. Loading error. Line 2, Column 762"
But when I use xlsx v2.0.1 to implement the above code, there is no problem. I tried to compare the xlsx files generated by the two versions, and found that the order of the sheetData and dataValidations in /xl/worksheets/sheet1.xml is different. In the xlsx file generated by v2.0.1, sheetData is before dataValidations, but in the xlsx file generated by v3.2.3, dataValidations are before sheetData. Therefore, when I try to use a text editor to put sheetData before dataValidations, save it, and then open the file, no error is reported.
I don't know what the problem is
I wrote a simple program (use xlsx v3.23) to test the cell drop-down list, but the saved xlsx file cannot be opened. My code is as follows:
When I tried to open testdroplist.xlsx with Excel, the following error was thrown: "An error was detected in testdroplist.xlsx, the replaced part: /xl/worksheets/sheet1.xml with xml error. Loading error. Line 2, Column 762"
But when I use xlsx v2.0.1 to implement the above code, there is no problem. I tried to compare the xlsx files generated by the two versions, and found that the order of the sheetData and dataValidations in /xl/worksheets/sheet1.xml is different. In the xlsx file generated by v2.0.1, sheetData is before dataValidations, but in the xlsx file generated by v3.2.3, dataValidations are before sheetData. Therefore, when I try to use a text editor to put sheetData before dataValidations, save it, and then open the file, no error is reported. I don't know what the problem is