Microsoft.office.interop

  • Thread starter Thread starter douglas
  • Start date Start date
D

douglas

I am using a .net 2005 desktop application to write data directly into an
excel 2003 spreasheet. I am using the namespace called
'Microsoft.office.interop.excel' tohave the vb.net application access excel
directly.
The code works fine except when Microsoft has a security update. Then the
code does not work after there has been a security update. I believe the code
does not work since the 'Microsoft.office.interop.excel' is a COM object.
Can you tell me if there is any other namespace that I could use that
would not be affected by each security update that Microsoft has?

Thanks!
 
I am using a .net 2005 desktop application to write data directly into an
excel 2003 spreasheet. I am using the namespace called
'Microsoft.office.interop.excel' tohave the vb.net application access excel
directly.
The code works fine except when Microsoft has a security update. Then the
code does not work after there has been a security update. I believe the code
does not work since the 'Microsoft.office.interop.excel' is a COM object.
Can you tell me if there is any other namespace that I could use that
would not be affected by each security update that Microsoft has?

Thanks!

Don't want to be a total ass, but why are you writing directly into
Excel?
Office 2007 can read Xml as like "native" spreadsheets and the
versions before that can read .csv

If you want calculations and other real excel-like stuff, you could
use the "normal" excelfile you always use, and link the data from the
other file.

You just can't write to the "data" -file when the "calculation"-file
is open (but then again, that's also impossible to do with the
Interop).

..L.
 
Leon:


Are you saying that I should write out all the data to another file first
and then put the data into excel? Basically for every line that appears on
the excel spreadsheet, I am call a stored procedure to obtain the data I
need. I then put each line on the excel spreadsheet that is need. The .net
program keeps track of the control logic break when I need to put data on a
new excel spreadsheet.
What is your recommendation?

Thanks!
 
Leon:


Are you saying that I should write out all the data to another file first
and then put the data into excel? Basically for every line that appears on
the excel spreadsheet, I am call a stored procedure to obtain the data I
need. I then put each line on the excel spreadsheet that is need. The .net
program keeps track of the control logic break when I need to put data on a
new excel spreadsheet.
What is your recommendation?

Thanks!

I recommend that you use 1 excel sheet (file) for data.
And 1 sheet (file) for the calculations.
The "data"-sheet could be a .csv or .xml (if 2007).

You can overwrite / rewrite / append / edit your data-file without
having to call the interop - just as long as the "calculation"-file is
closed - but that is (like I stated before) no different from writing
directly to 1 file.

..L.
 
I am using a .net 2005 desktop application to write data directly into an
excel 2003 spreasheet. I am using the namespace called
'Microsoft.office.interop.excel' tohave the vb.net application access excel
directly.
  The code works fine except when Microsoft has a security update. Thenthe
code does not work after there has been a security update. I believe the code
does not work since the  'Microsoft.office.interop.excel'  is a COM object.
  Can you tell me if there is any other namespace that I could use that
would not be affected by each security update that Microsoft has?

  Thanks!

Hi,

you could try using GemBox Spreadsheet .NET component for easier work
with Excel. You can use component for free if you need it for smaller
files (limit is 150 rows).

http://www.gemboxsoftware.com/GBSpreadsheet.htm
 
Back
Top