Multiple Excel Files

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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

    Anne Guest

  2. Similar Questions and Discussions

    1. Acrobat 8 Combine Files - Word, Excel = "Problem Files" Any help?
      Hello, I just puchased Acrobat 8 for the Mac specifically to combine multiple files from different programs into one professional document...
    2. Create Multiple Sheets in Excel with CFCONTENT
      Hello, I am able to create an Excel Workbook using the CFCONTENT tag, but am wondering what is the secret to having multiple sheets within the...
    3. Load ASP in Excel with Multiple Worksheets
      I have the basics working as is described in KB199841. I currently have my ASP page loading into Excel by setting the ContentType of the page:...
    4. Need better solution to export from sql server to multiple worksheets in excel in vb.net app
      I have a VB.NET Web application. I have to export data from SQL Server to excel. I have 3 Select statements and the results need to go in 3...
    5. Publishing multiple Excel pages on the Web (dynamically)
      I am sure this is very possible, but I've already wasted a lot of time trying to find the feature. I have automated producing management reports...
  3. #2

    Default Multiple Excel Files


    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
    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
    >
    >.
    >
    Anne Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139