简体   繁体   中英

.Net Script works in windows 7 but not in XP

I have a script which actually sorts an excel file and generates a text file out of the sorted file.

In other words, I have a button which users can click to sort the file. This sort button modifies the file and closes it. Next the user clicks on the GENERATE button to generate a text file out of the sorted sheets.

The generate function actually checks to see if the excel file is sorted before generating the text file.

However, my code works in windows 7 where the user clicks on the sort button and waits for it to finish before clicking on the generate button. However, in windows XP, the user clicks on the generate button and it will throw up an error stating that the excel file is not sorted. I have tried to open the file and the file shows that it is sorted.

Both framework are .NET 4.0

I had a similar problem when I opened Excel files from .net with different cultures as they usually have different sort methods, in one culture it sorted numbers before letters and in the other letters before numbers. It could be something related to this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM