Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
AnswerRe: log4net on Windows 7 Pin
jschell4-Jan-13 14:01
jschell4-Jan-13 14:01 
GeneralRe: log4net on Windows 7 Pin
Simon_Whale6-Jan-13 2:04
Simon_Whale6-Jan-13 2:04 
GeneralRe: log4net on Windows 7 Pin
jschell6-Jan-13 4:45
jschell6-Jan-13 4:45 
QuestionC# Equivalent of a Vlookup Pin
Member 97041533-Jan-13 22:00
Member 97041533-Jan-13 22:00 
AnswerRe: C# Equivalent of a Vlookup Pin
nainakarri4-Jan-13 0:55
nainakarri4-Jan-13 0:55 
GeneralRe: C# Equivalent of a Vlookup Pin
Member 97041534-Jan-13 1:38
Member 97041534-Jan-13 1:38 
GeneralRe: C# Equivalent of a Vlookup Pin
nainakarri4-Jan-13 20:22
nainakarri4-Jan-13 20:22 
QuestionXML Mapping to CSV Pin
RickSharp3-Jan-13 11:32
RickSharp3-Jan-13 11:32 
Hello,

I have a fixed XML table thats coming from a Web Service.
XML
<Loan>
<Name>JOHNSON, DANIEL R.</Name>
<Number>BMRES-550</Number>
<BankName>Bank of America</BankName>
<ClosingNo>123456</ClosingNo>
<FundsToSendAmt>49,7560.8600</FundsToSendAmt>
</Loan>


I need to convert the XML data to CSV. The data to be converted has commas. So the below method doesn't work:
C#
using (StreamWriter writer = File.CreateText("C:\\username\\password\\Desktop\\Export.csv"))
        {
            DataSet ds = new DataSet();
            ds.ReadXml(XmlReader.Create(new StringReader(myWebreference.GetWebServiceMethod("username", "password1", "Export", "Parameter4", DateTime.Today, DateTime.Today, ""))));

            writer.WriteLine(string.Join(",", ds.Tables["Loan"].Columns.Cast<DataColumn>().Select(col => col.ColumnName).ToArray()));
            foreach (DataRow row in ds.Tables["Loan"].Rows)
            {
                writer.WriteLine(string.Join(",", row.ItemArray.Cast<string>().ToArray()));

            }
        }

AnswerRe: XML Mapping to CSV Pin
David C# Hobbyist.3-Jan-13 11:58
professionalDavid C# Hobbyist.3-Jan-13 11:58 
GeneralRe: XML Mapping to CSV Pin
RickSharp3-Jan-13 13:01
RickSharp3-Jan-13 13:01 
GeneralRe: XML Mapping to CSV Pin
David C# Hobbyist.3-Jan-13 13:17
professionalDavid C# Hobbyist.3-Jan-13 13:17 
AnswerRe: XML Mapping to CSV Pin
PIEBALDconsult3-Jan-13 14:07
mvePIEBALDconsult3-Jan-13 14:07 
GeneralRe: XML Mapping to CSV Pin
RickSharp4-Jan-13 6:05
RickSharp4-Jan-13 6:05 
GeneralRe: XML Mapping to CSV Pin
PIEBALDconsult4-Jan-13 10:46
mvePIEBALDconsult4-Jan-13 10:46 
GeneralRe: XML Mapping to CSV Pin
RickSharp4-Jan-13 13:22
RickSharp4-Jan-13 13:22 
GeneralRe: XML Mapping to CSV Pin
jschell4-Jan-13 14:12
jschell4-Jan-13 14:12 
AnswerRe: XML Mapping to CSV Pin
jschell4-Jan-13 14:11
jschell4-Jan-13 14:11 
Questionhow to setup that form in the tabpage when tabpage resized Pin
linuxaidtest3-Jan-13 3:47
linuxaidtest3-Jan-13 3:47 
AnswerRe: how to setup that form in the tabpage when tabpage resized Pin
BillWoodruff3-Jan-13 16:42
professionalBillWoodruff3-Jan-13 16:42 
QuestionReading Excel from different processes in different computer Pin
SaneLucky3-Jan-13 2:58
SaneLucky3-Jan-13 2:58 
AnswerRe: Reading Excel from different processes in different computer Pin
Super Lloyd3-Jan-13 17:55
Super Lloyd3-Jan-13 17:55 
AnswerRe: Reading Excel from different processes in different computer Pin
April Fans3-Jan-13 19:33
April Fans3-Jan-13 19:33 
AnswerRe: Reading Excel from different processes in different computer Pin
micke.andersson28-Jan-13 4:45
micke.andersson28-Jan-13 4:45 
QuestionKeyValuePair from reference dll Pin
Isaksson3-Jan-13 1:52
Isaksson3-Jan-13 1:52 
AnswerRe: KeyValuePair from reference dll Pin
Super Lloyd3-Jan-13 17:51
Super Lloyd3-Jan-13 17:51 

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.