473,326 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Exclude certain fields from csv file

1
Morning all, long time reader, first time poster.

I need to manipulate an existing CSV file and create another one from it but excluding some fields.

For example, the fields I have in the 'master' file are: searchtime, viewid, depair, destair, resort, depdate, nights, hotel, rating, roominfo, boardbasis, price, adults, link, picture

I need to read through that file and only include depair, destair, depdate, resort, price, link, boardbasis, nights.

I have the lines in an array:
Expand|Select|Wrap|Line Numbers
  1. string[] fields = line.Split(new char[] { '|' });
How can I exclude these fields?

Thanks,
Brett
Jul 25 '07 #1
1 1214
kenobewan
4,871 Expert 4TB
Welcome to posting on TSDN. I would have seen if there is a way using ado, create a datatable and this. HTH.
Jul 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: John Field | last post by:
Hello, Is it possible to exclude certain files in a wx.FileDialog, so that the user won't see them and can't select them with the mouse in de File open window? I was thinking of somehow...
1
by: kmunderwood | last post by:
I have an xml file that I get "As Is" (at bottom of post) I want to sort and exclude some elements, and turn other child elements red, or its background. I want it to look like this: Tank ...
2
by: Peter | last post by:
I have a site which uses forms authentication but I would like to exclude certain pages on the site from authentication. In other words I would like the user to be able to get to these pages...
1
by: Chuck Ritzke | last post by:
Is it possible to exclude certain files from the "Copy Project" command, like can be done in FrontPage when publishing a web? How? This would be very convenient. For example, I have settings in...
4
by: Brad | last post by:
I'm not one to rant or flame....so please excuse me while I do so for this once. I've now spent a bit of time working with VS2005 beta 2 to see how it functions for web development, especially how...
9
by: paul.jameson | last post by:
I have a simple Access database that stores Karaoke Songlists for my local pub. From this you are able to print out the song lists they use. Up until now, any duplicate songs that appear on say,...
2
by: Arsen V. | last post by:
Hi, How to exclude the App_Data directory from Visual SourceSafe? It appears that Vs 2005 automatically adds the App_Data directory with the large binary MDF and LOG files to the Visual...
1
by: AntiChrist | last post by:
In VS 2005 if you exclude files from a project, it actually renames the file to filename.exclude. In previous versions, it just left the file alone but excluded it. If you have a very large...
8
by: tonsam | last post by:
I have a report (monthly inventory) whose record source is based on a query named monthly_inventory_qry. On same query (monthly_inventory_qry), I add two fields (month_1 and month_2)and its sum was...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.