Click here to Skip to main content
15,917,328 members
Home / Discussions / C#
   

C#

 
GeneralRe: Access Database Pin
Luis Alonso Ramos5-Feb-05 8:30
Luis Alonso Ramos5-Feb-05 8:30 
GeneralonMaximize() or onResize() questions... Pin
new_phoenix4-Feb-05 16:46
new_phoenix4-Feb-05 16:46 
GeneralRe: onMaximize() or onResize() questions... Pin
Heath Stewart5-Feb-05 3:39
protectorHeath Stewart5-Feb-05 3:39 
GeneralRe: onMaximize() or onResize() questions... Pin
new_phoenix5-Feb-05 8:20
new_phoenix5-Feb-05 8:20 
GeneralRe: onMaximize() or onResize() questions... Pin
Heath Stewart6-Feb-05 5:35
protectorHeath Stewart6-Feb-05 5:35 
GeneralRe: onMaximize() or onResize() questions... Pin
new_phoenix6-Feb-05 12:12
new_phoenix6-Feb-05 12:12 
GeneralRe: onMaximize() or onResize() questions... Pin
Heath Stewart7-Feb-05 6:36
protectorHeath Stewart7-Feb-05 6:36 
GeneralBest Practices - Serializing Dialog Data Pin
Newbie_T4-Feb-05 16:37
Newbie_T4-Feb-05 16:37 
GeneralRe: Best Practices - Serializing Dialog Data Pin
Heath Stewart5-Feb-05 3:30
protectorHeath Stewart5-Feb-05 3:30 
QuestionHow to modify the tnsnames.ora file by method? Pin
Colinyin4-Feb-05 13:06
Colinyin4-Feb-05 13:06 
GeneralCant get drag-n-drop from Excel to work. Please help. Pin
Flack4-Feb-05 12:14
Flack4-Feb-05 12:14 
GeneralRe: Cant get drag-n-drop from Excel to work. Please help. Pin
Heath Stewart4-Feb-05 13:23
protectorHeath Stewart4-Feb-05 13:23 
GeneralRe: Cant get drag-n-drop from Excel to work. Please help. Pin
Flack4-Feb-05 14:13
Flack4-Feb-05 14:13 
GeneralRe: Cant get drag-n-drop from Excel to work. Please help. Pin
Heath Stewart4-Feb-05 14:17
protectorHeath Stewart4-Feb-05 14:17 
GeneralRe: Cant get drag-n-drop from Excel to work. Please help. Pin
Flack5-Feb-05 9:49
Flack5-Feb-05 9:49 
Thanks for the help. I decided to try to get the values I need from the dropped Excel as XML.
However, when I try to iterate through the XML and extract the values I need, I'm not getting anything.

Here is a sample XML that I got form Excel:

<?xml version="1.0" ?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlnsBlush | :O ="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom" />
<Borders />
<Font />
<Interior />
<NumberFormat />
<Protection />
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="4" ss:ExpandedRowCount="1">
<Row>
<Cell>
<Data ss:Type="String">&quot;TE,ST&quot;</Data>
</Cell>
<Cell>
<Data ss:Type="String">&quot;&quot;</Data>
</Cell>
<Cell>
<Data ss:Type="String">&quot;&quot;&quot;</Data>
</Cell>
<Cell>
<Data ss:Type="String">&quot;,,&quot;</Data>
</Cell>
</Row>
</Table>
</Worksheet>
</Workbook>


Here is the code I tried to use to read it. (This is in my DragDrop event):

if (e.Data.GetDataPresent("Xml Spreadsheet") == true)
{
System.IO.Stream stream = e.Data.GetData("Xml Spreadsheet") as System.IO.Stream;
XmlTextReader message = new XmlTextReader(stream);
XPathDocument doc = new XPathDocument(message);
XPathNavigator navigator = doc.CreateNavigator();
XPathNodeIterator it = navigator.Select("Worksheet/Table/Row/Cell/Data");

while(it.MoveNext())
{
textBox1.Text += it.Current.Value;
}
}

This code doesnt work. The iterator returns a count of zero. Can you tell me what I am doing wrong? Is the xml doc not created correctly or is my expression used in the Select call incorrect?

Thanks for all of your help so far.

-Flack

GeneralRe: Cant get drag-n-drop from Excel to work. Please help. Pin
Heath Stewart6-Feb-05 6:08
protectorHeath Stewart6-Feb-05 6:08 
GeneralOverriding Uninstall method Pin
Adnan Siddiqi4-Feb-05 12:13
Adnan Siddiqi4-Feb-05 12:13 
GeneralRe: Overriding Uninstall method Pin
Heath Stewart4-Feb-05 13:21
protectorHeath Stewart4-Feb-05 13:21 
GeneralRe: Overriding Uninstall method Pin
Adnan Siddiqi4-Feb-05 20:10
Adnan Siddiqi4-Feb-05 20:10 
GeneralRe: Overriding Uninstall method Pin
Heath Stewart5-Feb-05 3:01
protectorHeath Stewart5-Feb-05 3:01 
GeneralRe: Overriding Uninstall method Pin
Adnan Siddiqi5-Feb-05 4:10
Adnan Siddiqi5-Feb-05 4:10 
GeneralRe: Overriding Uninstall method Pin
Heath Stewart5-Feb-05 4:58
protectorHeath Stewart5-Feb-05 4:58 
GeneralRe: Overriding Uninstall method Pin
Adnan Siddiqi5-Feb-05 8:28
Adnan Siddiqi5-Feb-05 8:28 
GeneralRe: Overriding Uninstall method Pin
Adnan Siddiqi6-Feb-05 2:34
Adnan Siddiqi6-Feb-05 2:34 
GeneralRe: Overriding Uninstall method Pin
Heath Stewart6-Feb-05 5:20
protectorHeath Stewart6-Feb-05 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.