Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Apr 04, 2014 6:30 pm

I have tried to get the row to autofit but it doesn't work. Any ideas on what I am doing wrong here?

Thanks,
Scott

Code: Select all
            Workbook wb = new Workbook();
            Worksheet ws = wb.Worksheets[0];
            StylesCollection styles = wb.Styles;


            //////////////////////////////////
            // set style
            //////////////////////////////////
            CellStyle cs;
            cs = styles.Add("1");
            cs.WrapText = true;
            cs.VerticalAlignment = VerticalAlignType.Top;
            cs.HorizontalAlignment = HorizontalAlignType.Left;
            cs.Font.FontName = "Trebuchet MS";
            cs.Font.Size = 18;
            cs.Font.IsItalic = true;
            cs.Font.IsBold = true;
            cs.Font.Color = Color.FromArgb(22, 34, 86);


            //////////////////////////////////
            // add data
            //////////////////////////////////
            ws.Range["A1"].Text = "TEST LOAN FUND";
            ws.Range["A1"].Style = styles["1"];
            ws.AutoFitRow(1);
            ws.Range[1, 1, 1, 10].Merge();


            ///////////////////////////////
            // save the workbook
            ///////////////////////////////
            string fullFilePath = @"C:\TEMP\sdubose\test.xls";
            if (File.Exists(fullFilePath))
            {
                File.Delete(fullFilePath);
            }

            wb.SaveToFile(fullFilePath, FileFormat.Version97to2003);
Attachments
Capture.GIF
screenshot attached
Capture.GIF (44.09 KiB) Viewed 3321 times

scott.dubose@virtusllc.com
 
Posts: 17
Joined: Wed Sep 18, 2013 8:49 pm

Mon Apr 07, 2014 6:43 am

Hello,

Sorry for late reply as weekend.
We have reproduced the issue and transferred to our Dev team, once there are any update, we will let you know ASAP. Sorry for inconvenience.
If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Apr 10, 2014 6:16 pm

Hi, any update on this? It is a on the critical path for release of our application.

Thanks
Scott

scott.dubose@virtusllc.com
 
Posts: 17
Joined: Wed Sep 18, 2013 8:49 pm

Fri Apr 11, 2014 6:30 am

Hello,

Sorry for inconvenience. Our Dev team is still working on it and we have urged them, once there are any update, we will inform you immediately.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Apr 18, 2014 4:23 pm

We downloaded hotfix spire.xls 7.3.12 but are still having the same issue.

thanks
scott

scott.dubose@virtusllc.com
 
Posts: 17
Joined: Wed Sep 18, 2013 8:49 pm

Mon Apr 21, 2014 3:26 am

Hello Scott,

Thanks for your reply. Sorry that the issue has not been fixed in the hotfix, which just fix the issue about the "Exception: An item with the same key has already been added". Sorry for inconvenience, our Dev team is still working on it.
If there are any questions, welcome to get it back to us.
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed May 28, 2014 8:02 am

Hi,

About your problem we have solved.
Please download the latest version spire.xls_hotfix_7.4.9.zip(the download link:http://www.e-iceblue.com/downloads/hot_fix/spire.xls_hotfix_7.4.9.zip)and test it.
If you have any problem,please inform us.

Thanks,
Lisa
E-iceblue support team
User avatar

lisa.chen
 
Posts: 21
Joined: Thu Mar 20, 2014 2:31 am

Return to Spire.XLS