473,320 Members | 2,080 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.

Multiple Excel Files

hie, in my web application, i have a dropdownlist, and a
button. i want to be able to select from the list, and
whatever item that i have selected, i want to use the item
value for manipulation. once i have selected from the
list, the button is clicked and the application will
display an excel file. for example, i chose number 8 in my
dropdownlist, and the application will display the excel
file with the number 8. i also need to use the item
selected to search for my excel files. How can i code this
function? i've tried coding it as below, but got an error
when i tried to append the item selected to a string
(strExcel). what can i do to make my program works as i
want it to? anybody got an idea on how to solve this?
thanx!

Private Sub btnOK_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btnOK.Click
Dim WW As New ListItem()
WW = wwList.SelectedItem()

strMyPath = "C:\Inetpub\wwwroot\Final_MR"

If fso.FolderExists(strMyPath) Then
fso.GetFolder(strMyPath)
For Each sFl In fso.GetFolder(strMyPath).Files
If sFl.Name Like ".xls" Then
strtmp = fso.GetFileName(sFl.Name)
intlngth = Len(strtmp) - 5
strName = Microsoft.VisualBasic.Left
(strtmp, intlngth)
strExcel = strName & WW & ".xls"
End If
Next
Response.Redirect
("C:\Inetpub\wwwroot\Final_MR\" & strExcel)
End If
End Sub

Nov 17 '05 #1
2 2077

it's ok..i got it 2 work like i wanted. thanx anyway...
-----Original Message-----
hie, in my web application, i have a dropdownlist, and a
button. i want to be able to select from the list, and
whatever item that i have selected, i want to use the itemvalue for manipulation. once i have selected from the
list, the button is clicked and the application will
display an excel file. for example, i chose number 8 in mydropdownlist, and the application will display the excel
file with the number 8. i also need to use the item
selected to search for my excel files. How can i code thisfunction? i've tried coding it as below, but got an error
when i tried to append the item selected to a string
(strExcel). what can i do to make my program works as i
want it to? anybody got an idea on how to solve this?
thanx!

Private Sub btnOK_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btnOK.Click
Dim WW As New ListItem()
WW = wwList.SelectedItem()

strMyPath = "C:\Inetpub\wwwroot\Final_MR"

If fso.FolderExists(strMyPath) Then
fso.GetFolder(strMyPath)
For Each sFl In fso.GetFolder(strMyPath).Files
If sFl.Name Like ".xls" Then
strtmp = fso.GetFileName(sFl.Name)
intlngth = Len(strtmp) - 5
strName = Microsoft.VisualBasic.Left
(strtmp, intlngth)
strExcel = strName & WW & ".xls"
End If
Next
Response.Redirect
("C:\Inetpub\wwwroot\Final_MR\" & strExcel)
End If
End Sub

.

Nov 17 '05 #2

it's ok..i got it 2 work like i wanted. thanx anyway...
-----Original Message-----
hie, in my web application, i have a dropdownlist, and a
button. i want to be able to select from the list, and
whatever item that i have selected, i want to use the itemvalue for manipulation. once i have selected from the
list, the button is clicked and the application will
display an excel file. for example, i chose number 8 in mydropdownlist, and the application will display the excel
file with the number 8. i also need to use the item
selected to search for my excel files. How can i code thisfunction? i've tried coding it as below, but got an error
when i tried to append the item selected to a string
(strExcel). what can i do to make my program works as i
want it to? anybody got an idea on how to solve this?
thanx!

Private Sub btnOK_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btnOK.Click
Dim WW As New ListItem()
WW = wwList.SelectedItem()

strMyPath = "C:\Inetpub\wwwroot\Final_MR"

If fso.FolderExists(strMyPath) Then
fso.GetFolder(strMyPath)
For Each sFl In fso.GetFolder(strMyPath).Files
If sFl.Name Like ".xls" Then
strtmp = fso.GetFileName(sFl.Name)
intlngth = Len(strtmp) - 5
strName = Microsoft.VisualBasic.Left
(strtmp, intlngth)
strExcel = strName & WW & ".xls"
End If
Next
Response.Redirect
("C:\Inetpub\wwwroot\Final_MR\" & strExcel)
End If
End Sub

.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Eliezer Figueroa | last post by:
Managing Multiple Excel incoming files? I have this situation. I have a client which have several locations they work primary with excel forms and they are thinking in doing reports with them....
2
by: Jen | last post by:
Trying to take one table in access and split it into multiple excel files(using an excel template); and then email based on email addresses in Table2; Of course, I would like to do all of this...
0
by: Anne | last post by:
hie, in my web application, i have a dropdownlist, and a button. i want to be able to select from the list, and whatever item that i have selected, i want to use the item value for manipulation....
28
by: kkadakia | last post by:
I get a daily excel file for a entire month which I want to transfer into Access at the end of the month. So, there are around 20-25 excel files I get by the end of the month, and I would like to...
1
by: msanger | last post by:
Hi, I have several excel sheets in Office 2007, which has all kinds of standard calculations, and a consolidated Excel Sheet with totals and rollup of all the other excel files. The issue I am...
2
by: ciaran.hudson | last post by:
Hi I have multiple excel files of the same format in a directory. They are called book1.xls, book2.xls, book3.xls and so on. What is the easiest way to import the tab named sheet1 from each of...
1
by: CF FAN | last post by:
Can Report Builder Export Excel Files with multiple Sheets How can I create a report that it can export in excel by multiple
3
by: Tim | last post by:
Hi Folks, I'm used to a UNLOAD command that allows me to dump to a named flat file the results of any SELECT statement. Hence one can build a single SQL file which contains multiple SQL...
7
by: ivancycheng | last post by:
I have around 400 excel files with same format (multiple sheets) and wants to import few sheets from excel to MS Access (XP version) for further processing. any one can advise me how to do it? (I'm...
3
by: stephen | last post by:
Hi, I have 5 excel files and they have multiple sheets. I have to read (say sheet 3) of each of the 5 excel files and consolidate them into one. what's the best way to achieve this. if someone...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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)...
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
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.