469,604 Members | 2,381 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,604 developers. It's quick & easy.

how to open Existing Excel file ....

Hello,

i tried to open existNg Excel file by using follow metho bt it give error ... that this file doestnt exist or path is incorrect........

wb = ThisApplication.Workbooks.Open(paramWorkbookPath,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);

& i also used this method tooo..
it also doesnt work .. :(


wb= ThisApplication.Workbooks.Open(paramWorkbookPath, 0, true, 5,
"", "", true, Excel.XlPlatform.xlWindows, "\t", false, false,
0, true,Type.Missing, Type.Missing);

//////////
second thing how to read data from excel file & use it for charts...

i am using Excel 2007 , C# 2005 ... all z doing using COM...

waiting for reply..
thanks...........
Jan 16 '08 #1
4 2809
RedSon
5,000 Expert 4TB
Hello,

i tried to open existNg Excel file by using follow metho bt it give error ... that this file doestnt exist or path is incorrect........

wb = ThisApplication.Workbooks.Open(paramWorkbookPath,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);

& i also used this method tooo..
it also doesnt work .. :(


wb= ThisApplication.Workbooks.Open(paramWorkbookPath, 0, true, 5,
"", "", true, Excel.XlPlatform.xlWindows, "\t", false, false,
0, true,Type.Missing, Type.Missing);

//////////
second thing how to read data from excel file & use it for charts...

i am using Excel 2007 , C# 2005 ... all z doing using COM...

waiting for reply..
thanks...........
There must be something wrong with your paramWorkbookPath.
Jan 16 '08 #2
that problem of method z solved i gave the the wrong extention .. nw
problem z no file z opened ... nothNg z happened...

so plz help me out ...

(i'm usNg C#2005, Excel 2007 & COM)

thanks
Jan 17 '08 #3
RedSon
5,000 Expert 4TB
that problem of method z solved i gave the the wrong extention .. nw
problem z no file z opened ... nothNg z happened...

so plz help me out ...

(i'm usNg C#2005, Excel 2007 & COM)

thanks
What? Do you think you could use proper English so I can tell what the heck you are talking about?
Jan 17 '08 #4
i used the followning fuctions But when i click the button ... nothNg is done ... ( means excel file didn't open)............

tring workbookPath = "G:\\test.xls"; // Add your own path here
Microsoft.Office.Interop.Excel.Workbook excelWorkbook = ThisApplication.Workbooks.Open(workbookPath, 0,
false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindow s, "", true,
false, 0, true, false, false);

or this one ........

wb = ThisApplication.Workbooks.Open(paramWorkbookPath,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
///////////
Can u please guide me ... how to open Existing Excel File ...

& how to get data from it ...

(i am using C# 2005, Excel 2007 & COM)

thanks................
Jan 17 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by Allison Bailey | last post: by
1 post views Thread by Joe Cletcher | last post: by
3 posts views Thread by Fauna | last post: by
reply views Thread by kennedystephen | last post: by
9 posts views Thread by Looch | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.