Click here to Skip to main content
15,914,013 members
Home / Discussions / C#
   

C#

 
GeneralRe: Hotkey to focus my TextBoxes Pin
anderslundsgard10-Jul-07 20:35
anderslundsgard10-Jul-07 20:35 
GeneralRe: Hotkey to focus my TextBoxes Pin
mav.northwind11-Jul-07 8:36
mav.northwind11-Jul-07 8:36 
QuestionBarcode Software Pin
Brendan Vogt10-Jul-07 3:13
Brendan Vogt10-Jul-07 3:13 
AnswerRe: Barcode Software Pin
mav.northwind10-Jul-07 3:35
mav.northwind10-Jul-07 3:35 
QuestionGetting image from resource file Pin
liqnit10-Jul-07 3:10
liqnit10-Jul-07 3:10 
AnswerRe: Getting image from resource file Pin
mav.northwind10-Jul-07 3:38
mav.northwind10-Jul-07 3:38 
AnswerRe: Getting image from resource file Pin
Luc Pattyn10-Jul-07 4:14
sitebuilderLuc Pattyn10-Jul-07 4:14 
QuestionFile Conversion from CSV format Excel format in C# [modified] Pin
liyakhat_shahid10-Jul-07 3:00
liyakhat_shahid10-Jul-07 3:00 
Hi,

I have created a class. In that I have written the following code:

I have added the Header file "using Vishal.TextFileUtils"

Vishal.TextFileUtils is the Supporting header file. You can see it( "http://vishalseth.com/blog/2007/02/20/vishaltextfileutils-library-for-working-with-delimited-text-file-formats).

namespace ConsoleApplication12
{
class Program
{
static void Main(string[] args)

{

DelimitedFile df = new DelimitedFile(new FileFormat(PredefinedFormats.CSV), @"C:\GCProject\Input Example.csv");

foreach (LineEntry le in df)
{
Console.WriteLine(le.FieldValues["MyColumnName"]);

for (int i = 0; bool.Parse(df.Count.ToString()); i++)
{
le.FieldValues["MyColumnName"] = "MyColumnData";
}
}
df.Save(@"C:\output.xls");



}
}
}

When Run the application, I found the error like KeyNotFoundError(I have bold where I am getting the error). Which I not able to find what is happening.

So, the general flow for this application is:

1. CSV Input File is created by user or external application
2. My Application reads data in from CSV file
3. My Application converts records from the CSV file to a new format (xls format)
4. My Application outputs to text file.

Please let me know if you require additional information.

Thanks & Regards,
Liyakhat.


Liyakhat Alikhan, Chennai


-- modified at 10:06 Tuesday 10th July, 2007
AnswerRe: File Conversion from CSV format Excel format in C# Pin
Not Active10-Jul-07 3:06
mentorNot Active10-Jul-07 3:06 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
liyakhat_shahid10-Jul-07 3:16
liyakhat_shahid10-Jul-07 3:16 
AnswerRe: File Conversion from CSV format Excel format in C# Pin
rp_suman10-Jul-07 3:32
rp_suman10-Jul-07 3:32 
AnswerRe: File Conversion from CSV format Excel format in C# Pin
J4amieC10-Jul-07 4:13
J4amieC10-Jul-07 4:13 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
liyakhat_shahid10-Jul-07 4:21
liyakhat_shahid10-Jul-07 4:21 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
Martin#10-Jul-07 4:42
Martin#10-Jul-07 4:42 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
liyakhat_shahid11-Jul-07 19:50
liyakhat_shahid11-Jul-07 19:50 
AnswerRe: File Conversion from CSV format Excel format in C# Pin
Ed.Poore10-Jul-07 5:15
Ed.Poore10-Jul-07 5:15 
Questionsearch dialog Pin
topksharma198210-Jul-07 2:59
topksharma198210-Jul-07 2:59 
AnswerRe: search dialog Pin
Luc Pattyn10-Jul-07 3:07
sitebuilderLuc Pattyn10-Jul-07 3:07 
GeneralRe: search dialog Pin
topksharma198210-Jul-07 4:07
topksharma198210-Jul-07 4:07 
GeneralRe: search dialog Pin
Luc Pattyn10-Jul-07 4:18
sitebuilderLuc Pattyn10-Jul-07 4:18 
GeneralRe: search dialog Pin
Luc Pattyn10-Jul-07 4:20
sitebuilderLuc Pattyn10-Jul-07 4:20 
AnswerRe: search dialog Pin
mav.northwind10-Jul-07 3:40
mav.northwind10-Jul-07 3:40 
QuestionHow to show a bookmarked position in default browser? Pin
mav.northwind10-Jul-07 2:18
mav.northwind10-Jul-07 2:18 
AnswerRe: How to show a bookmarked position in default browser? Pin
Luc Pattyn10-Jul-07 2:46
sitebuilderLuc Pattyn10-Jul-07 2:46 
GeneralRe: How to show a bookmarked position in default browser? Pin
mav.northwind10-Jul-07 3:34
mav.northwind10-Jul-07 3:34 

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.