@amjad.sahi Is it possible to print date and time in excel in footer programmatically using Aspose Cells for Java API?
You may use â&Dâ command/script for current date and â&Tâ to set/ current time in the header/footer for your needs. See the following sample code for your reference.
e.g.
Sample code:
// Instantiate and load the Excel file
Workbook workbook = new Workbook("Book1.xlsx");
// Obtaining the reference of the PageSetup of the first worksheet
PageSetup pageSetup = workbook.getWorksheets().get(0).getPageSetup();
// Setting worksheet name at the left header
pageSetup.setHeader(0, "&A");
// Setting current date and current time at the right footer and changing the font of the footer
pageSetup.setFooter(2, "&\"Times New Roman,Bold\"&D-&T");
// Saving the Excel file
workbook.save("SetDateTimeFooter_out.xlsx");
Also, see the document for your reference.
https://docs.aspose.com/cells/java/page-setup-features/#setting-headers-and-footers
Hope, this helps a bit.
Sure, please take your time to try the suggested code segment. Hopefully, it will work for your needs.