|
You'll need to expand on that question if you want a decent answer.
Which cells? In an Excel worksheet, on a grid of your own, where? What data request? Is Excel doing the requesting? How?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have my cell 30 bottom in excel.I need to pull this data using the loop.How can I do
|
|
|
|
|
Doesn't improve much on clearness.
If you want to loop data in an Excel-spreadsheet, there's multiple ways to do so. One is rather easy, using a IDbConnection - but that would be specifically aiming at the values, no painting.
Depending on WHERE you want to paint, it should be done from Excel or your own application. I'd recommend you first google for some examples on reading an excel-file and see how far you get.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Could you please help me.I'm trying for a long time because.I would be glad if you can help.
|
|
|
|
|
Kalay16 wrote: Could you please help me I'm a trying to, but I do not know "how".
Kalay16 wrote: I'm trying for a long time because Explain, using lots of small words what you are trying. Any code you can share would help too.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
var cell = (Microsoft.Office.Interop.Excel.Range)excelWorksheet.Cells[5, 3];
label1.Text = Convert.ToString(cell.Value);
cell = (Microsoft.Office.Interop.Excel.Range)excelWorksheet.Cells[6, 3];
label2.Text = Convert.ToString(cell.Value);
cell = (Microsoft.Office.Interop.Excel.Range)excelWorksheet.Cells[7, 3];
label3.Text = Convert.ToString(cell.Value);
cell = (Microsoft.Office.Interop.Excel.Range)excelWorksheet.Cells[8, 3];
label4.Text = Convert.ToString(cell.Value);
cell = (Microsoft.Office.Interop.Excel.Range)excelWorksheet.Cells[9, 3];
label5.Text = Convert.ToString(cell.Value);
I want to do with the loop .
|
|
|
|
|
Kalay16 wrote: I want to do with the loop What has that to do with drawing?
for (int i = 0; i < 9; i++)
{
cell = (Microsoft.Office.Interop.Excel.Range)excelWorksheet.Cells[i, 3];
} When posting a question on Excel, do state that you're using "Office Interop"; there's more than one way to do stuff with excel, and it helps to know which one.
If you still need to draw (in Excel), then you might want to investigate the "Border" property and the likes, on MSDN[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
for (int i = 0; i < 10; i++)
{
var cell = (Microsoft.Office.Interop.Excel.Range)excelWorksheet.Cells[i, 3];
listView1.Items.Add(Convert.ToString(cell.Value));
}
0x800A03EC
Check the ErrorCode property of the exception to determine the HRESULT returned by the COM object.
Gave such an error .In line count of 103.My range of cells B5:B35.
There are compatibility issues .Therefore, I am having a lot of errors.
|
|
|
|
|
Are you editing an "XLS" or an "XLSX" file? How many rows are in the sheet?
The reason I'm asking is because the errorcode is mentioned on SO[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Yes, but I do not know what code is in your editor on line 103
Is it an XLS or an XLSX? How many rows?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
XLSX 103 rows
|
|
|
|
|
xlxs 103 rows
|
|
|
|
|
What compatibility issues? Between different versions of Excel? The .NET framework? 32/64 bit applications?
There are multiple reasons why the error-code can be thrown, some of the are listed here[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I do not know anymore 64-bit PC . I am using Excel 2013 .
|
|
|
|
|
Kalay16 wrote:
I do not know anymore 64-bit PC . I am using
Excel 2013 . You can verify which version by looking at the about-box. If your PC is 32-bits, then all installed software is too.
I still don't know what code is at the line where you mentioned an error, nor what you mean with compatibility-issues. I cannot "solve" this, you'll have to; are you still trying to access values in a loop? With drawing?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello,
I face some challenges and would appreciate help in finding out how to handle it.
I am using XML serialization to save some data of an application. However, I would like to use the same XML file in a different application. I do not want to de-serialize the file; I just read it with XmlDoc.
The reading part of it works fine, however, in my other application I would like to execute same SelectNodes+Xpath queries - that's the problem. Any query, I do, doesnt work for some reason.
Here an example of my XML file:
="1.0"="utf-8"
<TestProject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/Test">
<DicKeysWhichDirectlyReferenceMe xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<IsCurrentlyLoading>false</IsCurrentlyLoading>
<IsLoaded>false</IsLoaded>
<IsProcessing>false</IsProcessing>
<ListsWhichDirectlyReferenceMe xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<ObjectsWhichDirectlyReferenceMe xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<name>UnknownTypeName</name>
...
A query like this just works, but doesnt bring a big benefit for course...!
XmlDocument doc = new XmlDocument();
doc.Load("test.xml");
XmlNode node = doc.ChildNodes[1];
XmlNodeList list = doc.SelectNodes("*");
However, a query like this doesnt work:
XmlNodeList list = doc.SelectNodes("IsLoaded");
XmlNodeList list1 = doc.SelectNodes("/IsLoaded");
XmlNodeList list2 = doc.SelectNodes("//IsLoaded");
I was already trying many things, inc. adding some namespaces, but I wasnt successful.
Again, I would be thankful for any help!
thanks and best regards
|
|
|
|
|
You need to drop down 1 level; e.g.
XmlDocument doc = new XmlDocument();
doc.Load( "test.xml" );
XmlNode root = doc.DocumentElement;
XmlNodeList list = root.SelectNodes( "IsLoaded" );
OR
XmlDocument doc = new XmlDocument();
doc.Load( "test.xml" );
XmlNodeList list = doc.SelectNodes( "TestProject/IsLoaded" );
|
|
|
|
|
hello,
I am working on a c # application has logged a database informix odbc, I put my connection string but when I run the application I get an error that says ERROR [28000] [SCO Vision] [ODBC Driver] Invalid user authorization specification.
I think you have to download the SCO ODBC VISION But its been a week since I'm looking for driver not found
Are you know what is this error has ?.
Thank you
|
|
|
|
|
According to the ultimate resource on connection strings http://www.connectionstrings.com/informix/[^], the ODBC connection string for an Informix database looks thus:
Informix 3.30:
Dsn='';Driver={INFORMIX 3.30 32 BIT};Host=hostname;Server=myServerAddress;
Service=service-name;Protocol=olsoctcp;Database=myDataBase;Uid=myUsername;
Pwd=myPassword;
Important! The parameters for user authorization are called 'Uid' and 'Pwd'.
You need to be wary of this as the IBM Informix OLE DB Provider connection string uses the parameter names 'User ID' and 'Password'.
The quotes are not part of the parameter name.
Best regards,
Manfred
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
why delegates are used in c#
|
|
|
|
|
Because we can.
Because they are usefull.
Because they are function-pointers-on-steroids.
Because some things won;t work without them (or something very like them).
Google could tell you a lot more: it found this very quickly.
6 important uses of Delegates and Events[^]
In future, please do at least basic research, and not waste your time or ours.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
This is the OP's first post on CP.
« There is only one difference between a madman and me. The madman thinks he is sane. I know I am mad. » Salvador Dali
|
|
|
|
|
I was fresh out of bed, and hadn't finished my first
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Sorry, dude, but I think you are over reacting a touch. He asked a perfectly valid question, which might not be up to your high standards, but valid none the less. Just ignore the question if you feel the OP hasn't "Done Enough".
Take a look at Bill's answer to the same question, and you can see a huge difference between attitudes.
Everyone dies - but not everyone lives
|
|
|
|