Spire.OfficeViewer for .NET as a powerful Office Viewer component, is designed for developers to load Word, Excel, Presentation slides and PDF files and view them from Windows Forms Applications.

Wed Apr 07, 2021 8:33 am

Hi

we are looking for a tool to view/modify excel files. We need to integrate this into our VSTO Excel application.
I tried the Officeviewer, but it takes a long time to load an Excel file (also used the HelloWorld example). I only see the blue circle thingy, for about 5 minutes, then I stopped. tried several files about 100k to 2Mb.

Some additional questions;

Is it possible to get a range of data?
Is it possible to go to a specific cell?
Is it possible to Fill a cell (or range of cells) with e.g. other color?

Thanks in advance,

regards,

Arie

arie.smit
 
Posts: 1
Joined: Wed Apr 07, 2021 7:00 am

Thu Apr 08, 2021 9:12 am

Hello Arie,

Thanks for your inquiry.
Regarding the issue of loading file, to help us reproduce your issue and investigate whether it can be optimized, could you please provide us with your input file? You could send it to us (support@e-iceblue.com) via mail. Thanks in advance.

As for your additional questions, sorry to tell you that our Spire.OfficeViewer does not support these features you mentioned, but our Spire.Spreadsheet supports. Below is the corresponding code for your reference.
1. Get a range of data.
Code: Select all
            spreadsheet1.LoadFromFile("Sample.xls");
            int startRow = 0, endRow=3;
            int StartCol = 0, enCol = 3;
            for (int i = startRow; i < endRow; i++)
            {
                for (int j = StartCol; j < enCol; j++)
                {
                    string dataij = spreadsheet1.Worksheets[0].set.GetText(i, j);
                }
            }

2. Go to a specific cell.
Code: Select all
            spreadsheet1.Worksheets[0].SetActiveCell(3, 1);

3. Fill a cell (or range of cells) with other color
Code: Select all
            CellRange range = spreadsheet1.ActiveWorksheet.Cells;
            range.Items[0].Style.ForegroundColor = Color.Red;


Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Mon Apr 19, 2021 9:45 am

Hello,

Greetings from E-iceblue!
Did the code we provided work for you? Could you please give us some feedback at your convenience?

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.OfficeViewer