Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 12th, 2007, 03:04 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default export excel files

Hi,

I have a .net winforms application that exports excel files into the database. I have to modify the code so that the files are loaded in a specific order according to their file names.
The format of the file name is as follows: date_name.xls. The date part changes but not the name.
I have to first load for example 080807_Venues.xls followed by 080807_Seminar.xls and then 080807_Employees.xls etc.

How do i tell the code the order by which to load the files?

Thanks for the help

  #2 (permalink)  
Old August 13th, 2007, 07:04 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

How are you selecting what files to deal with? Is the user selecting these files? Is the program picking them up automatically from somewhere?

I noticed that the list you provided is in descending alphanumeric order. Is this relevant or coincidence?

-Peter
  #3 (permalink)  
Old January 3rd, 2008, 09:09 AM
Authorized User
 
Join Date: Jul 2007
Location: Bangalore, Karnataka, India.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mujahidkhaleel
Default

You can probably try

string[] names = new string[] {"Venues", "Seminar", "Employees"};

foreach(string name in names)
{
    FileInfo[] xlfiles = dir.GetFiles("*" + name + ".xls");
    //Your file processing code here
}

Mujahid Khaleel
Web designing, development, E-commerce applications.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSV files export with Classic ASP, special chars tn_bobbie Classic ASP Basics 1 July 9th, 2015 09:12 AM
Generating Excel FIles from resource Files abinashpatra ASP.NET 1.0 and 1.1 Basics 0 July 28th, 2008 03:07 AM
Export to multiple Excel files using template ecapox Access VBA 0 February 5th, 2008 10:38 AM
Merge many excel files into one excel files Roshanjoshi2001 Excel VBA 2 November 14th, 2007 06:23 PM
Export to Many files using VB6 and CR8.5 PauloMongo Crystal Reports 1 October 28th, 2003 04:39 AM



All times are GMT -4. The time now is 04:29 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.