473,770 Members | 4,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception from HRESULT : 0x800A03EC when trying to range value

51 New Member
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.Applicati on oXL = null;
oXL = (Excel.Applicat ion)
System.Runtime. InteropServices .Marshal.GetAct iveObject("Exce l.Application") ;
oXL.Visible = true;

Excel.Worksheet sh = (Excel.Workshee t)oXL.ActiveShe et;
Excel.Range rng = (Excel.Range)oX L.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 1825

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

Similar topics

1
11240
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 Exception: System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. at Excel._Chart.Export(String Filename, Object FilterName, Object Interactive)
0
4183
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 = appExcel.Workbooks.Open(fileExcel) wbook.PrintOut(fisrtPage, lastPage, , , "Acrobat Distiller", True, filePs) wbook.Close()
8
14507
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 wrong.....or do you have a suggestion for a better way.......I do know this method is quite slow. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
2
1115
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 = drvProd("RunNo") xlWS.Cells(row, 2).Value = drvProd("CGN") xlWS.Cells(row, 3).Value = "" xlWS.Cells(row, 4).Value = drvProd("WorkOrder") tempb = drvProd("Qty")
2
36975
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 following exception, when i run the tool in a machine which contains MS Office 2003. Exception raised: "Exception from HRESULT: 0x800A03EC" Note: Added "Microsoft Excel 11.0 Object Library" in the project reference.
5
9245
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" named range is not present. Why the does the function crash instead of returning "null"?
0
4927
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 make sure the code runs first before I implement it into my application. The code is supposed to plot for X values: column A in excel and for Y values: column B in Excel. The code up to the point and including exporting the data to excel runs...
0
1819
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 data I get the error -- Exception from HRESULT: 0x800A03EC (what does this mean?). I've searched the web and have been unsuccessful in finding a viable solution to the error. A snippet of my code is below: Excel.Range cf = null; // Create...
0
1225
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: B14,D14,F14,H14,J14,L14,N14,P14,R14,T14,V14,X14,Z14,AB14,AD14,AF14,AH14,AJ14,AL14,AN14,AP14,AR14,AT14,AV14,AX14,AZ14,BB14,BD14,BF14,BH14,BJ14,BL14,BN14,BP14,BR14,BT14,BV14,BX14,BZ14,CB14,CD14,CF14,CH14,CJ14,CL14,CN14,CP14,CR14,CT14,CV14,CX14,CZ14,DB14,DD14,DF14,DH14,DJ14,DL14,DN14,DP14 I...
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.