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

Loading xlsx Client side vs Server side

3 Answers 256 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Lloyd
Top achievements
Rank 2
Lloyd asked on 05 Mar 2017, 09:13 PM
I downloaded the latest version of the ASP.net ajax controls and the samples.  I have isolated the spreadsheet sample with import export.  When I hit the button and load an xlsx spreadsheet from my client, it does a faithful representation of the .xlsx  When I try to load the same .xlsx from the server using the SpreadsheetDocumentProvider, it loads, but it is not a faithful representation.  All of my hidden rows and columns are visible, and the spreadsheet itself extends past the edge of the control.

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 08 Mar 2017, 02:01 PM

Hi Lloyd,

We are not aware of this problem. The client and server export should behave similarly.

Can you try to remove one by one the contents of your .xlsx file until you find out which part of it is causing the problem?

In case you are unable to locate and fix the problem, please open a support ticket and send your .xlsx file along with a simple runnable project that shows the problem so that we can debug and test it?

Best regards,

Rumen
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jason
Top achievements
Rank 1
answered on 22 Mar 2018, 04:09 PM

Hi Rumen,

I am also experiencing this same issue. An excel sheet uploaded from the client using RadAsyncUpload works good (hidden fields stay hidden, pick-list drop-downs load from original excel).  The same excel sheet loaded server side loses some of this formatting and functionality.  Hidden fields get shown (jammed together) and the pick-lists no longer work. 

Server side code looks like this:

private const string ProviderSessionKey = "Telerik.Web.Examples.SpreadSheet.Import_Export.DefaultCS";
protected void Page_Init(object sender, EventArgs e)
{
      SpreadsheetDocumentProvider provider;
      if ((Session[ProviderSessionKey] == null) || (!IsPostBack))
            {
                provider = new SpreadsheetDocumentProvider(Server.MapPath("~/App_Data/NOSAMS.xlsx"));
                RadSpreadsheet1.Provider = provider;
                RadSpreadsheet1.DataBind();
            }else{
                provider = (SpreadsheetDocumentProvider)Session[ProviderSessionKey];
                RadSpreadsheet1.Provider = provider;
                RadSpreadsheet1.DataBind();
            }
        }

Any ideas of progress with the original post from Lloyd?  Any ideas why it would be processed/loaded differently and how to fix?

**We are using the recent Telerik_UI_for_ASP.NET_AJAX_2018_1_117_Dev version**

Thanks,

Jason

0
Peter Milchev
Telerik team
answered on 27 Mar 2018, 12:14 PM
Hello Jason,

In the recent versions, there are some differences between the client-side and server-side import/export. 

Would you please open an official support ticket and attach there a sample Excel file that reproduces the issue so that we can investigate it? 

Meanwhile, you can use the client-side import/export as demonstrated in the Spreadsheet client-side import file from server and save client-side exported file on server Code library project.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Spreadsheet
Asked by
Lloyd
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Jason
Top achievements
Rank 1
Peter Milchev
Telerik team
Share this question
or