Open snairdesai opened 9 months ago
@snairdesai, confirming a successful run on a Mac machine. Some files don't match the ones on this branch. I will push what I have on my end, but feel free to revert/overwrite if needed.
@snairdesai, I think the current README is too lengthy. My suggestion would be to remove or push down any details on context or extra information. As a user, the first section I want to see is a clear intuition of the input and output, concrete steps for implementation, and only relevant warnings. I would remove all the details on the spreadsheet linking and the description of the function arguments (this should be documented in the code itself).
@jc-cisneros Sounds good, and I agree. I'll remove the details on linking and function arguments. In the PR, can you use the "suggestion" tag to delete any other lines you feel are irrelevant? I can review and we'll discuss your proposed changes.
@jc-cisneros: Latest version for your comments pushed in this commit.
Thanks @snairdesai! The README looks less cluttered now. Will test this on a Windows machine.
@snairdesai, I got the following error on Windows (also note that you need to run the terminal as administrator to get the right permission level):
\juanc\OneDrive\Desktop\template\paper_slides\code\slides.tex"`
pdf-crop-margins not found. Installing it now...
pdf-crop-margins has been successfully installed.
Error in `export_excel_tables()` for gs_primary: list index out of range
Traceback (most recent call last):
File "C:\Users\juanc\OneDrive\Desktop\template\paper_slides\..\lib\gslab_make\gslab_make\run_program.py", line 1268, in export_excel_tables
worksheet = workbook.Worksheets[2]
~~~~~~~~~~~~~~~~~~~^^^
File "C:\Users\juanc\miniconda3\envs\template\Lib\site-packages\win32com\client\dynamic.py", line 322, in __getitem__
return self._get_good_object_(self._enum_.__getitem__(index))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\juanc\miniconda3\envs\template\Lib\site-packages\win32com\client\util.py", line 41, in __getitem__
return self.__GetIndex(index)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\juanc\miniconda3\envs\template\Lib\site-packages\win32com\client\util.py", line 65, in __GetIndex
raise IndexError("list index out of range")
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\juanc\OneDrive\Desktop\template\paper_slides\make.py", line 52, in <module>
gs.export_excel_tables(PATHS, template = 'gs_primary', scalar = 'gs_primary_scalars.xlsx')
File "C:\Users\juanc\OneDrive\Desktop\template\paper_slides\..\lib\gslab_make\gslab_make\run_program.py", line 1294, in export_excel_tables
raise RuntimeError(error_message)
RuntimeError: Error in `export_excel_tables()` for gs_primary: list index out of range
Thanks @jc-cisneros, that is helpful. I'll try testing this on the lab Windows and see if I can debug.
Closes #85.
The purpose of this PR is to extend the
template
architecture to enable native Excel to PDF conversions. See the issue thread for additional details, and in particular https://github.com/gentzkow/template/issues/85#issuecomment-1819927895 for the final proposal of the workflow. The core workhorse function isexport_excel_tables()
ingslab_make()
(find the development version here).@jc-cisneros has been assigned as a reviewer. To review this PR, please complete the following:
/extensions/excel_tables/README.md
to ensure they are clear and capture the essence of our proposed direction in #85.gslab_make
to ensure they are logical (see the relevant lines here). If preferred, you can also achieve this as part of the parallel PR ingslab_make
(see here).Thanks for the review @jc-cisneros!