Click here to Skip to main content
15,893,337 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to close child form on the click event of toolstrip button Pin
Bekjong12-Jul-07 2:04
Bekjong12-Jul-07 2:04 
QuestionC# USB Detection [modified] Pin
donovan.solms12-Jul-07 0:43
donovan.solms12-Jul-07 0:43 
AnswerRe: C# USB Detection Pin
Giorgi Dalakishvili12-Jul-07 1:10
mentorGiorgi Dalakishvili12-Jul-07 1:10 
AnswerRe: C# USB Detection Pin
Martin#12-Jul-07 1:38
Martin#12-Jul-07 1:38 
GeneralRe: C# USB Detection Pin
donovan.solms12-Jul-07 1:54
donovan.solms12-Jul-07 1:54 
QuestionHow to convert CSV file to XLS file using C# Programme Pin
liyakhat_shahid12-Jul-07 0:27
liyakhat_shahid12-Jul-07 0:27 
AnswerRe: How to convert CSV file to XLS file using C# Programme Pin
Bijesh12-Jul-07 1:06
Bijesh12-Jul-07 1:06 
GeneralRe: How to convert CSV file to XLS file using C# Programme Pin
liyakhat_shahid13-Jul-07 1:55
liyakhat_shahid13-Jul-07 1:55 
Hi Bijesh,

First of all thanks, I got the code to Convert CSV file to XLS file using Excel Application object.

My code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using Microsoft.Office.Interop.Excel;

namespace File_Conversion
{
class Program
{
static void Main(string[] args)
{
ApplicationClass app = new ApplicationClass();
Workbook doc = app.Workbooks._Open(
@"C:\GCProject\Input Example.csv",
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
false,
Missing.Value,
Missing.Value,
false);
Console.WriteLine("Reading CSV File........");
doc.SaveAs(
@"C:\GCProject\Output.xls",
XlFileFormat.xlWorkbookNormal,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
XlSaveAsAccessMode.xlExclusive,
Missing.Value,
false,
Missing.Value,
Missing.Value,
Missing.Value);
doc.Saved = true;
Console.WriteLine("Converted CSV to XLS file");
app.Quit();
Console.ReadLine();


}
}
}


But Now, I have to get specified format, Like.

My CSV file Contains Data like.
-----------------------------------

Ex: DriverID | CustomerID | Ship to ID | Load # | BOL Date/TimeStamp |PrdNam
520 | 2355 - | 1 | 61953 | ############ | 1 Eth 87

My XLS file Contains Data Like.
-----------------------------------------------------------------------------
Ex: Field | Definition | Length | Starting Column | Ending Column |
-----------------------------------------------------------------------------
delimiter"
-----------------------------------------------------------------------------
TransType|Some Definition |1 | 1 | 1
|
-----------------------------------------------------------------------------
delimiter ","
-----------------------------------------------------------------------------
Termin ID | Some Difinition| 3 | 3 | 5
|
-----------------------------------------------------------------------------
delimiter ","
-----------------------------------------------------------------------------
Term SPLC | Some Difi | 7 | 6 | 12
|
-----------------------------------------------------------------------------

I got the code converting CSV file to XLS file. But What I need is Converted
XLS file should look like above format in Converted Excel sheet.


Hope I explained well.!

Thanks in advance.

Regards,
Liyakhat.
AnswerRe: How to convert CSV file to XLS file using C# Programme Pin
Jimmanuel12-Jul-07 1:15
Jimmanuel12-Jul-07 1:15 
AnswerRe: How to convert CSV file to XLS file using C# Programme Pin
martin_hughes12-Jul-07 2:30
martin_hughes12-Jul-07 2:30 
AnswerRe: How to convert CSV file to XLS file using C# Programme Pin
Pete O'Hanlon12-Jul-07 3:03
mvePete O'Hanlon12-Jul-07 3:03 
QuestionProblem with Cookies Enabled detection Pin
Adoremi11-Jul-07 23:10
Adoremi11-Jul-07 23:10 
AnswerRe: Problem with Cookies Enabled detection Pin
chandu_shar12-Jul-07 0:21
chandu_shar12-Jul-07 0:21 
Questiondisable all DataGridViewRowHeaderCell glyphs Pin
agent32711-Jul-07 22:37
agent32711-Jul-07 22:37 
QuestionProblems with configuring .Net hosted control Pin
drweb8611-Jul-07 22:24
drweb8611-Jul-07 22:24 
Questionradiobutton BeforeStateChange ? Pin
fracalifa11-Jul-07 22:20
fracalifa11-Jul-07 22:20 
AnswerRe: radiobutton BeforeStateChange ? Pin
Martin#11-Jul-07 22:32
Martin#11-Jul-07 22:32 
AnswerRe: radiobutton BeforeStateChange ? Pin
Luc Pattyn11-Jul-07 23:48
sitebuilderLuc Pattyn11-Jul-07 23:48 
GeneralRe: radiobutton BeforeStateChange ? Pin
Martin#12-Jul-07 0:05
Martin#12-Jul-07 0:05 
GeneralRe: radiobutton BeforeStateChange ? [modified] Pin
fracalifa12-Jul-07 0:32
fracalifa12-Jul-07 0:32 
GeneralRe: radiobutton BeforeStateChange ? Pin
Luc Pattyn12-Jul-07 0:36
sitebuilderLuc Pattyn12-Jul-07 0:36 
GeneralRe: radiobutton BeforeStateChange ? Pin
fracalifa12-Jul-07 0:40
fracalifa12-Jul-07 0:40 
JokeRe: radiobutton BeforeStateChange ? Pin
Luc Pattyn12-Jul-07 1:44
sitebuilderLuc Pattyn12-Jul-07 1:44 
AnswerRe: radiobutton BeforeStateChange ? Pin
ruanr12-Jul-07 0:23
ruanr12-Jul-07 0:23 
AnswerRe: radiobutton BeforeStateChange ? Pin
Martin#12-Jul-07 0:39
Martin#12-Jul-07 0:39 

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.