Click here to Skip to main content
14,551,199 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello everyone,

I have a PDA device (Windows Mobile 6.5) in which I am building an application in C# using Visual Studio 2008(Compact Framework 3.5). Part of this application requires reading some data from excel file in order to add them to a report. I tried many of the framework suggestions I read online, but nothing seems to be suitable.

Does anybody know how to either:
1)Convert the .xlsx file to .csv so that I can read it with Filestream & StreamReader, or
2)Find the assemblies for Excel Data Reader or ByteScout Spreadsheet SDK (they both claim to have dll for Compact Framework but I can't find them anywhere) or
3)Any other way I can read excel files from the device(I don't need to process the file, only to get the data)?

I know similar questions have been asked before but I tried many different things and nothing worked properly. Any help or suggestions would be valuable.

Thank you in advance.

What I have tried:

CsvHelper,Excel Data Reader,FileStream,ByteScout Spreadsheet SDK
Updated 10-Jul-19 5:36am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

anastasia_ 11-Jul-19 2:58am
I forgot to mention, I tried this library as well but when I load the file I get the "DivideByZeroException". I cannot understand how can this exception be thrown by opening a file. Do you have any idea of what causes this error?

This is the code i use to open the file:

string file = "\\My Documents\\Business\\excel_test.xlsx";
Workbook workbook = Workbook.Load(file);
MadMyche 11-Jul-19 9:43am
I know little about Compact Framework and nothing about your file, so really cannot help you with the problem. It would be much easier to work with CSV as it is does not require special readers
anastasia_ 11-Jul-19 9:52am
I cannot store the file in the PDA in .csv form,because it it imported from an other device(a machine that produces reports and is able to export them in excel form). I tried converting the files from .xlsx to .csv in the device but so far without success. Nevertheless, thank you for answering me!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100