Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default reading excel

i am trying to read excel using this code. also tried with ApplicationClass.

Microsoft.Office.Interop.Excel.Application app = new
Microsoft.Office.Interop.Excel.Application();
Workbook book = null;
Worksheet sheet = null;
Range range = null;
book = app.Workbooks.Open(openFile.FileName, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value);
sheet = (Worksheet)book.Worksheets[1];

i am getting error at app.workbooks.Open ----- Exception from HRESULT:
0x800A03EC

unable to find the solution

Thanks for any help.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel is reading formula as a value Louise[_3_] Excel Worksheet Functions 3 April 9th 10 05:48 PM
Reading TSv files in Excel [email protected] Excel Programming 1 October 13th 06 07:01 AM
Reading registry with Excel Alesandro Senerchia Excel Programming 1 April 26th 05 12:26 AM
Reading CSV file from Excel (VBA) Alex[_28_] Excel Programming 2 April 7th 05 03:10 AM
Excel Reading Fredrick Excel Programming 1 September 17th 03 06:20 AM


All times are GMT +1. The time now is 08:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"