Questions tagged [excel-interop]

Excel Interop is the layer using the COM Interop that allows .NET (VB or C#) to communicate with standard COM objects and libraries.

Excel Interop is part of the COM Office Interop. It allows .NET (VB or C#) to communicate with other COM objects and libraries.

1630 questions
0
votes
1 answer

Excel Interop's set_value method damages values

I found a problem while using the set_value method. I wrote the simplest possible code to exclude my mistakes. When I read some cells and then write them back to sheet using set_value while: any filters are active in xlsx file, 2 or more columns…
0
votes
1 answer

Error when hiding columns programmatically on excel and filling again

I'm developing an Excel Addin that fills a sheet with information from a web page. There's a button that shows two more columns, I get the information and fill the columns, and after that, if the button "Show this columns" is not pressed, I hide…
AlexTemina
  • 139
  • 11
0
votes
1 answer

Excel Worksheet with C#

I'm updating a chart inside an excel in this way: ChartObject Chart2 = (ChartObject)mWSheet1.ChartObjects(1); Chart2.Activate(); Range chartRange2 = mWSheet3.UsedRange; Chart2.Chart.SetSourceData(chartRange2, Missing.Value); When I want to print…
gsmida
  • 357
  • 1
  • 5
  • 15
0
votes
1 answer

Calling Sheet from a WorkBook

I'm trying to call the 5th sheet in an open workbook. When I open the workbook from the program I seem to be able to do it: Dim CurrentRun As New Excel.Application Dim CurrentBook As Excel.Workbook Dim CurrentSheet As Excel.Worksheet Private Sub…
Atl LED
  • 656
  • 2
  • 8
  • 31
0
votes
1 answer

Object reference of current ribbon in excel

I have 4 buttons in my excel ribbon. Once I click on the 4th button I want to hide the visibility of the other 3 buttons. How can I do that in c#?
shriguru nayak
  • 310
  • 1
  • 3
  • 21
0
votes
1 answer

Microsoft Interop Excel. COM Exception with Windows Server 2003

I deployed a VS.Net 2003 web application on Windows Server 2003 where Microsoft Office is not installed. Everything works except Excel report functionality. It's fine in my development PC where I have MS office. The exception is: COM object with…
CodeMad
  • 950
  • 2
  • 12
  • 30
0
votes
2 answers

Cell values getting truncated while excel upload

I am using following code for excel upload OleDbConnection sSourceConnection; string properties = "Excel 8.0; HDR=NO; IMEX=1;";//properties set for connection to excel string sSourceConstr =…
Rajneesh
  • 2,185
  • 4
  • 20
  • 30
0
votes
1 answer

"Save As" Dialog in ASP.Net for exporting an excel file? (service account)

I have a code working for saving the exported file into my PC/Destination however since the ASP.NET (4.0) will be displayed in a server running a service account, i would like to let the user after he clicks the button1 to prompt "Save as" dialog so…
Eddy V
  • 99
  • 4
  • 15
0
votes
1 answer

when you change Format of the cells using "Format Cells" option then No excel event gets fired

Can someone tell me that If I have already selected one cell in Excel Right click on it Go to format cells options Change the formatting Then which event will be fired? Please note that I do not move away from original cell through this…
Sagar
  • 645
  • 2
  • 9
  • 31
0
votes
1 answer

Inserting Data into Excel using Cell References rather than indexing

I'm having an export excel method in my c# code. Earlier I was inserting data into each cells as WorksheetObj.Cells[rowvalue,colvalue] = "something"; But, Is there a way to insert data into cell using Cell reference, like WorksheetObj.Cells["A",1]…
Sandeep
  • 278
  • 1
  • 6
  • 21
0
votes
1 answer

Excel Interop: Application and ApplicationClass differences

I'm running into a problem with excel interop. Basically, what I'm trying to do is call a macro in an excel workbook from .NET with a complex argument type. However, in doing so I'm running into some differences between Application and…
0
votes
1 answer

How To Open and Process Excel Attachment with Exchange Server?

I am looking for some help on loading an Excel attachment into memory, and then process the excel document. The main issue im having is using EWS to load the attachment into memory and then processing the document. The end result is to load the…
user1732364
  • 925
  • 4
  • 28
  • 58
0
votes
1 answer

Excel Interop failed to write (HRESULT: 0x800A03EC)

I got an exception 0x800A03EC when I was trying to execute this command in Excel Interop ws.get_Range("A2").Value= "=?9ABC" It seems that interop doesn't like string that starts with "=?". I tried to solve the issue by setting Calculation mode to…
user2136168
  • 73
  • 2
  • 7
0
votes
1 answer

Writing data to excel cells erase existing cells I don't touch

My application reads data from an excel file with 9 columns, does some work and, if some conditions are met, writes data in the 9th column of the current row. This part works fine. The problem is that everything I didn't write gets erased, even…
0xFF
  • 808
  • 1
  • 12
  • 33
0
votes
1 answer

Linking 2 cells in Excel using c#

I need to link 2 cells from 2 different excel workbooks. How can I do that? Example: Say if A1 cell of Book1 and B2 of Book2 are linked. If I update A1 cell of Book1 with 1000, then B2 of Book2 should automatically get updated to 1000. Any idea how…
shriguru nayak
  • 310
  • 1
  • 3
  • 21
1 2 3
99
100