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.

Mon Sep 11, 2023 2:44 pm

Hi,
I got an error why try to format column 6 with column width and alignment: "Index was outside the bounds of the array" . I try to see how the ubound of spreadsheet.columns the get the return of 5 only ? I'm using Vb.net
Please see attached photo below. Not sure if I use the command incorrectly, please help
Attachments
Error1.jpg
Max columns = 5 ?
Error1.jpg (83.81 KiB) Viewed 4054 times

htchanit
 
Posts: 3
Joined: Wed Jun 03, 2020 2:26 pm

Tue Sep 12, 2023 2:51 am

Hi,

Thank you for reaching out to us regarding the issue you encountered while using our XLS product. We appreciate your feedback and would like to assist you in resolving the problem.

Upon reviewing the code you provided, it appears that the error is due to a misunderstanding of the index used in the sheet.Columns() method. Please note that the column index values in this method start from 0, not 1.

we kindly request you to modify the code by adjusting the column indexes accordingly,
If you require any further assistance or have additional questions, please don't hesitate to reach out to us. We are here to help you.

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.XLS