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 Dec 02, 2016 8:26 am
There are some checkboxes in a Excel,can I set their checked/unchecked states with Spire.xls?
-
Jay.L
-
- Posts: 8
- Joined: Fri Dec 02, 2016 2:54 am
Fri Dec 02, 2016 8:41 am
Dear Jay.L,
Thanks for your inquiry.
Here is sample code for your kind reference.
- Code: Select all
Workbook book = new Workbook();
book.LoadFromFile(@"F:\testing\xls test form\sample document\9201.xlsx");
Worksheet sheet = book.Worksheets[0];
ICheckBoxes checkboxes = sheet.CheckBoxes;
//change the state
checkboxes[0].CheckState = CheckState.Checked;
book.SaveToFile("9201.xlsx", ExcelVersion.Version2013);
Sincerely,
Betsy
E-iceblue support team
-
Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Tue Dec 06, 2016 7:42 am
Dear Jay.L,
Did you test the code ? Did it help you to solve the issue ?
Thanks,
Betsy
E-iceblue support team
-
Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Wed Dec 07, 2016 12:58 am
Betsy.jiang wrote:Dear Jay.L,
Did you test the code ? Did it help you to solve the issue ?
Thanks,
Betsy
E-iceblue support team
Dear support team,
I am sorry for late reply. I have tested the code and it does help me.Thanks very much!
-
Jay.L
-
- Posts: 8
- Joined: Fri Dec 02, 2016 2:54 am
Wed Dec 07, 2016 1:17 am
Dear Jay.L,
Thanks for your feedback.
Welcome to write to us again for further question.
Sincerely,
Betsy
E-iceblue support team
-
Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am