Click here to Skip to main content
15,031,345 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an excel file which I need to import to DGV. I am using oledb to achieve this but I am not able to import cells with formulae. Is there any way to do this. I read somewhere that converting excel files to xml and then importing would work, can anyone please illustrate how to do this if at all it is possible to do it that way? Any other suggestion is also appreciated.

1 solution

Abhinav S 14-Apr-13 2:54am
Thank you SA.
tkull1 14-Apr-13 2:03am
This video just shows how to transfer data using oledb, it doesn't take care of the cell in excel with formulas
Abhinav S 14-Apr-13 2:55am
You cannot transfer formulas to a data grid view directly. The best you can do is while you are importing the excel file, read the formulas and implement equivalents of them in your code.
tkull1 14-Apr-13 3:47am
Can you please tell exactly how to do that. While transferring data by using oledb can we access one particular cell of excel? how to convert one particular formula to text or string?
Abhinav S 14-Apr-13 4:18am

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900