473,383 Members | 1,855 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Exception from HRESULT : 0x800A03EC when trying to range value

51
I have created a class library which has user defined functions for excel.
One of functions need reference to current excel so as to insert value to many cell. I have given the code below showing how i am getting active worksheet.
The problem occurs when i am trying to put value in to cell or range.

//Code
Excel.Application oXL = null;
oXL = (Excel.Application)
System.Runtime.InteropServices.Marshal.GetActiveOb ject("Excel.Application");
oXL.Visible = true;

Excel.Worksheet sh = (Excel.Worksheet)oXL.ActiveSheet;
Excel.Range rng = (Excel.Range)oXL.ActiveCell;

//The following line gives me the error
sh.Cells[1,1]="Test";

I am not able set value to any cell or range.

Please Help,
Sep 21 '07 #1
0 1794

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

Similar topics

1
by: Steven | last post by:
Hi there, I am trying to export a chart using the Excel11 object from C#. I can properly open workbooks and read cells, but calling Export() on the Chart object throws a COMException ...
0
by: e-lores | last post by:
I need to print an excel doc to PDF. I'm doing next until now 1.- First I print the file to PostScript format using 'Acrobat Distiller' printer Dim wbook As Excel.Workbook wbook =...
8
by: scorpion53061 | last post by:
Additional information: Exception from HRESULT: 0x800A03EC. This code produced this error. I am pretty sure I got this to run a while back and I was wondering if you all see anything I am doing...
2
by: Darrell Wesley | last post by:
After sorting a dataset using a DataView and then creating a DataRowView I get an Exception from HRESULT: 0x800A03EC on only one field in the DataRowView. code snippet: xlWS.Cells(row, 1).Value...
2
by: Sai | last post by:
Hi, I have written a small tool for our internal purpose in VB.net. This tool reads data from logs and saves it in an excel file. This tool is working fine with MS Office 2000 but raising the...
5
by: Mikil | last post by:
I am communicating with Excel Interop dll using c#. The get_Range function throws an exception if the parameters are invalid. For e.g. get_Range("Mikil", Type.Missing); will crash if the "Mikil"...
0
by: rGh | last post by:
Hello, I am trying to create an Excel chart from C#. I am not a very experieced programmer, so my mistake could be very trivial. The code included is a very simple example. I just wanted to...
0
by: hne | last post by:
Hi friends, I have an application, written in C#, in which I am updating an Excel spreadsheet with data I pull from a sql database. When I try to select a cell in where I want to begin inserting my...
0
by: Stephen Plotnick | last post by:
I'm getting HRESULT: 0x800A03EC On this statement: cfDataBar = osheet.Range(RangeText).FormatConditions.AddDatabar with these values in RangeText:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.