I have been writing put excel code into Stata, and have then applied some mata code at the end of my script to make the column widths a nice size etc. However what I would like to do is remove the gridlines from my excel file from which I have been writing my data into....
My code currently is:
mata
b = xl()
b.load_book("G:\Insight Inteligence and Analytics\From 2022 onwards\1 IandA Framework\B2 Dashboards\EDI Data\EDI Factsheets 2023\STATA\Powerquery\AS\edifactsheet_webfile_TEST _20230419.xlsx")
b.set_sheet("Age")
b.set_column_width(1,1,17)
b.set_column_width(5,5,10)
b.set_gridlines("off")
b.close_book()
end
without the line b.set_gridlines("off") the code runs without error...however with that line included I appear to be getting the below error message:
set_gridlines() not declared in class xl
r(3000);
I cannot seem to figure out what is causing this error or how to correct it for it to work and wondered if someone please could help me. Thank you for reading.
My code currently is:
mata
b = xl()
b.load_book("G:\Insight Inteligence and Analytics\From 2022 onwards\1 IandA Framework\B2 Dashboards\EDI Data\EDI Factsheets 2023\STATA\Powerquery\AS\edifactsheet_webfile_TEST _20230419.xlsx")
b.set_sheet("Age")
b.set_column_width(1,1,17)
b.set_column_width(5,5,10)
b.set_gridlines("off")
b.close_book()
end
without the line b.set_gridlines("off") the code runs without error...however with that line included I appear to be getting the below error message:
set_gridlines() not declared in class xl
r(3000);
I cannot seem to figure out what is causing this error or how to correct it for it to work and wondered if someone please could help me. Thank you for reading.
Comment