Hi,
Do we support file title on the cells for java?
I read the doc and tried coding, and only found workbook.getTheme(), not the getTitle(), like your other family do have this function.
On the MicroSoft excel do have file property summary with title,…
Please use the Workbook.CreateBuiltinStyle() method for your needs. Here is a Java as well as C# code. Please check the output Excel file generated by the code for your reference. All links are given below.
After downloading, remove its extension or rename it as output.xlsx output.xlsx.remove.zip (6.2 KB)
But I can’t open your two files with link, I got erroras the following:
Sorry, this file is private. Only visible to post creator and staff members.
By the way my question is to get existing excel file title, because convert excel file to image maybe need the info. Maybe need to create title for existing excel file without title.
We are sorry that you could not download the attachments. I have intimated the respective team and they will be fixing the issue soon.
In the meantime, you may download the attachment from dropbox here:
Do you need to retrieve or manipulate Document properties e.g Title, Subject, Author,etc.? Please elaborate your requirements more and give us a sample Excel document and attach some screenshots to explain your needs, we will check it soon.
Yes, as per the screenshot, the sample code (shared previously) actually specifies a built-in Title (style) of MS Excel on a cell’s text.
Could you provide us a sample Excel file here to show your requirements, we will check and help you on how to do it via Aspose.Cells APIs. You can create the sample Excel file (with your desired title) manually in MS Excel and save it.
I have checked the “yearly-calendar-with-holidays.xls” file and found it has a main year header and sub-titles for months, etc… Which title you are talking about, e.g
C3–> theyear
or
C5, K5, S5, etc. —> January, February, March, etc.
or something else?
please elaborate and provide more details about your requirements, so we could understnad your better.
.
Well, to evaluate if the header cell has some value or not, you may get the relevant cell (e.g C3) in the worksheet and then evaluate if it is null or not. See the sample code below:
e.g Sample code:
//Open the Excel file.
Workbook workbook = new Workbook("yearly-calendar-with-holidays.xls");
//Since your workbook has formulas and some values are based on calculated results,
//so it is better to calculate all the formulas first.
workbook.calculateFormula();
//Get the C3
Cell cell = workbook.getWorksheets().get("Sheet1").getCells().checkCell(2,2);
//Or
//Cell cell = workbook.getWorksheets().get("Sheet1").getCells().get("C3");
if (cell == null)
{
//Your code goes here.
};
//Get the value.
System.out.println(cell.getStringValue());
//Your code goes here.
//..........