This is a migrated thread and some comments may be shown as answers.

Upload file Excel

1 Answer 329 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Caio
Top achievements
Rank 1
Caio asked on 17 Sep 2013, 09:35 PM
Hi!
I need help.
I use RadAsyncUpload to upload file (.xls or .xlsx) and save in a directory.
Now, I need read this file and populate a GridView with these rows. How I can make it? How I call this control as methot in my .cs?
Other question... I use TargetFolder to save file, but this function works just in LocalHost, in webserver, I can't save file (IIS7).

Tks!

<div class="qsf-demo-canvas">
        <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MultipleFileSelection="Automatic" TargetFolder="~/Uploads" OnFileUploaded="btnImportFile_OnClick" />
        <telerik:RadProgressArea runat="server" ID="RadProgressArea1" />
    </div>

below is my GridView with all columns in my Excel template.

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="false" GridLines="None"
            Visible="false">
            <Columns>
                <asp:BoundField DataField="MainFolder" />
                <asp:BoundField DataField="SecondLevel" />
                <asp:BoundField DataField="ThirdLevel" />
                <asp:BoundField DataField="FourthLevel" />
                <asp:BoundField DataField="Classification" />
                <asp:BoundField DataField="OWNER" />
                <asp:BoundField DataField="OWNER2" />
                <asp:BoundField DataField="OWNER3" />
                <asp:BoundField DataField="OWNER4" />
                <asp:BoundField DataField="GroupR" />
            </Columns>
        </asp:GridView>

Att.

Caio Vinicius.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Sep 2013, 10:29 AM
Hi Caio,

Please have a look into this article which deals with binding ASP GridView using Excel. Also have a look into this documentation which explains the Settings for IIS7.

Hope this helps,
Shinu.
Tags
Upload (Obsolete)
Asked by
Caio
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or