473,320 Members | 1,922 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,320 software developers and data experts.

Could you please point me in the right direction?

Hi every1!

My first post on Bytes :)

I want to create a simple web page that will read of CSV file, sort the file by certain fields, take out duplicate entries if 3 fields have the same value and then write the amended csv file to a XLS file?

Is this possible and could you please point me in the right direction?

Kind Regards,
Chloe ~X~
Apr 7 '09 #1
6 2243
gits
5,390 Expert Mod 4TB
in case there is no user-interaction between all the steps you mentioned, then it is quite easier to upload the file to the server, process it there and send back the xls-file ... i assume that a user has the csv file and should get an xls file from it?

kind regards
Apr 7 '09 #2
Hi,

Yeah the user will have the csv file and will upload to the page and then once the duplicates have been removed from the csv they will receive a xls file by downloading it?

Where would i start to achieve this? What should i be reading up on? Is there a csv reader or should i use Stream reader?

Kind Regards,
Chloe ~X~
Apr 7 '09 #3
gits
5,390 Expert Mod 4TB
i'm not very familiar with those .NET things but i guess that there are some components that you might use to read a file and produce an xls from it. i just wanted to say that in your current case it is the better way to do all this serverside than trying to do it clientside. may be some of the .NET experts could give you more specific hints for the concrete components that you might use ... a google search for .NET csv reader and writing xls-files gave me a lot of hits ...

kind regards
Apr 7 '09 #4
Frinavale
9,735 Expert Mod 8TB
It sounds like you already have a good idea of how to do this.

Upload the file to the server.
Once you have it there, load the file into memory.
Then manipulate the file according to your requirements.
Then save the file.


Just remember that CSV files are comma delimited....

There is tons of stuff on google for this type of thing too...

Once you've attempted the problem and get stuck post back here on Bytes and we'll help you through your problem.

-Frinny
Apr 7 '09 #5
dorandoran
145 100+
on user interface:
Browse for file > Select a File > Read the file > out put to box on the screen
Expand|Select|Wrap|Line Numbers
  1. private void openFile_Click(object sender, System.EventArgs e)
  2. {
  3. openFileDialog.ShowDialog();
  4. }
  5.  
  6. private void openFileDialog_FileOk(object sender, System.ComponentModel.CancelEventArgs e)
  7. {
  8. string fullPathname = openFileDialog.FileName;
  9. FileInfo src = new FileInfo(fullPathname);
  10. filename.Text = src.Name;
  11. source.Text = "";
  12. TextReader reader = src.OpenText();
  13. string line;
  14. while ((line = reader.ReadLine()) != null)
  15. {
  16. source.Text += line + "\n";
  17. }
  18. reader.Close(); // !!! dont forget !!!
  19. }

from MS Press Visual C# Step by step
Apr 7 '09 #6
Frinavale
9,735 Expert Mod 8TB
Pssst Dorandoran, this is an ASP.NET application and so there is no OpenFileDialog available ;)
Apr 8 '09 #7

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

Similar topics

5
by: Joseph Ellis | last post by:
Hello all. I have a family website that I have been maintaining for the past year and a half or so. It includes a photo album that has grown quite large. So far I've displayed the photo album...
2
by: BryanEverly | last post by:
Hi, I'm struggling with a problem and was hoping that someone on this group could point me in the right direction. I'm not looking for a free ride, just a suggestion as to how best to use all...
2
by: pikapi | last post by:
I have the following table: direction bin net 1 s1 6 2 s2 3 1 s1 2 2 s1 4 1 s2 5 I want to produce a table like this:
20
by: Jack Schitt | last post by:
I thought I was starting to get a handle on Access, until I tried doing something useful...now I'm stuck. I have a DB with two tables - to keep it simple I'll say that one is an Employee File...
6
by: Robert Lawson | last post by:
I continue to get the below error message when trying to load a aspx file. Could someone please point me in the right direction for solving this? I'm trying to access an access data base and I'm...
3
by: Jheitmuller | last post by:
Hi, I would like to convert a VB.NET application from being a Windows app to an ASP.NET app. I'm new to web development, so this may be a simple question. Is it possible to render simple drawing...
13
by: sd00 | last post by:
Hi all, can someone give me some coding help with a problem that *should* be really simple, yet I'm struggling with. I need the difference between 2 times (Target / Actual) However, these times...
1
by: Erland | last post by:
Hello, I am using asp.net 2.0 and I want to add keyboard shortcuts to my application just like the shortcuts you see in GMAIL. I was wondering how can I do this in ASP.NET? Scenerio that would...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.