This is a previously written tool to read and write Excel across Windows and iOS, because the original reference tool referenced by the third party read and write Excel DLL can only be used under the WinDOS, resulting in the Mac machine running on the PC side or packaging, each time you have to go through the Windows Guide table submission, Then you can update it on your Mac. Therefore, it is necessary to cross-platform the Guide tool and not rely on third-party DLLs. Later on the internet learned that after 07 Excel is saved through XML, and finally compressed into a zip file. You can try to change the Excel file suffix to zip, and then use the compression tool to view it. Based on this, I studied the structure of several XML files and the relationship between the implementation of the combination of Zip decompression + read and write XML to read and write Excel files. The following is a simple use
1 Public Static voidTest ()2 {3Excelworksheet sheet =NewExcelworksheet ("xxxx.xlsx");4 //Read5 stringvalue1 = sheet. cells[0,0];6 stringvalue2 = sheet. cells[1,1];7 stringValue3 = sheet. cells[1,2];8 //Write9Sheet. cells[0,0] ="test1";TenSheet. cells[0,1] ="1"; OneSheet. cells[1,1] ="2"; A //automatic expansion of tables to 10x10 -Sheet. cells[Ten,Ten] ="1"; - sheet. Save (); the -}
SOURCE Download link (Baidu network disk)
Link: Https://pan.baidu.com/s/1o8DoAkM Password: hzch
Read and write across platform Excel from Unity