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

Problems with Excel Import/Export

2 Answers 267 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 22 Jan 2016, 09:21 PM

With regard to this previous thread: http://www.telerik.com/forums/rad-grid-import-from-excel

2 things.

First, I've examined the code and I'm a bit confused.  I thought this technique only worked for XLS format, not the new XLSX.

Second, I have had an app up and running for some time now using that technique to import xls files without any problem. 

Now, suddenly I cannot perform this operation locally in Visual Studio.2012  (It was working fine during the original development)  It crashes: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

 As far I know this is part of the package Microsoft Access Database Engine 2010.  I have version 14 installed.

Suggestions?

 

2 Answers, 1 is accepted

Sort by
0
Boris
Top achievements
Rank 1
answered on 25 Jan 2016, 06:50 PM

My apologies.  Let's forget this.

It seems definite that my problems all stem from the installation of 64-bit Office 2013 on my current development machine.

0
Karen
Top achievements
Rank 1
answered on 14 Jun 2017, 08:14 PM

Hi,

I'm trying to Export Telerik Grid to Excel by using code(SharePoint 2013):

using Telerik.Windows.Documents.Spreadsheet;
using Telerik.Windows.Documents.Spreadsheet.FormatProviders;
using Telerik.WinControls.Export;
using Telerik.Windows.Documents.Core;
using Telerik.Windows.Zip;
using Telerik.Web.UI.Export;
using Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml;
using Telerik.Windows.Documents.Spreadsheet.Model;
using Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx;
using Telerik.Windows.Documents.Fixed;


        protected void btnEportToXLS_Click(object sender, EventArgs e)
        {

            if (TicketsGrid.Items.Count > 0)
            {
                try
                {

                    TicketsGrid.Rebind();
                    TicketsGrid.ExportSettings.ExportOnlyData = true;
                    TicketsGrid.ExportSettings.IgnorePaging = true;
                    TicketsGrid.ExportSettings.OpenInNewWindow = true;
                    TicketsGrid.MasterTableView.UseAllDataFields = true;
                    TicketsGrid.ExportSettings.FileName = "C:\\ExcelFile.xlsx";// Guid.NewGuid().ToString();
                    TicketsGrid.MasterTableView.ExportToExcel();
                }
                catch (Exception exc)
                {

                }
            }

        }

        private GridItemType[] supportedItemTypes = new GridItemType[] 
        { 
            GridItemType.Header, 
            GridItemType.AlternatingItem, 
            GridItemType.Item 
        };

 

After executing the code getting exception:
Could not load file or assembly 'Telerik.Windows.Documents.Spreadsheet, Version=2016.1.106.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.

Any suggestions please?

Tags
Grid
Asked by
Boris
Top achievements
Rank 1
Answers by
Boris
Top achievements
Rank 1
Karen
Top achievements
Rank 1
Share this question
or