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.
Sat Jan 20, 2018 10:02 pm
Hello
Is there any way that one can find if a special cell (say E8) is a completely blank cell(No content, no styling) or not?
Thanks
-
ahmadi_rad@yahoo.com
-
- Posts: 43
- Joined: Thu Apr 13, 2017 3:53 pm
Mon Jan 22, 2018 6:42 am
Hello,
Thanks for your inquiry. Please refer to the below code snippet to accomplish your task.
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
CellRange range = worksheet.Range["E8"];
if (range.IsBlank)
{
//no content
}
var style=range.Style;
if (!style.IncludeAlignment && !style.IncludeBorder && !style.IncludeFont && !style.IncludeNumberFormat && !style.IncludePatterns && !style.IncludeProtection)
{
//no style
}
Best regards,
Simon
E-iceblue support team
-
Simon.yang
-
- Posts: 620
- Joined: Wed Jan 11, 2017 2:03 am
Tue Jan 23, 2018 8:44 am
Thanks for the answer
-
ahmadi_rad@yahoo.com
-
- Posts: 43
- Joined: Thu Apr 13, 2017 3:53 pm
Thu Jan 25, 2018 6:30 am
Hello,
Greeting from E-iceblue.
Did you try the code I provided? Is it helpful to you?
Your feedback will be greatly appreciated.
Best regards,
Simon
E-iceblue support team
-
Simon.yang
-
- Posts: 620
- Joined: Wed Jan 11, 2017 2:03 am