Skip to content

add Workbook.save() method #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fzumstein opened this issue Nov 7, 2014 · 3 comments
Closed

add Workbook.save() method #110

fzumstein opened this issue Nov 7, 2014 · 3 comments

Comments

@fzumstein
Copy link
Member

No description provided.

@fzumstein fzumstein added this to the v0.2.4 milestone Nov 7, 2014
@fzumstein fzumstein modified the milestones: v0.3.0, v0.3.1 Nov 25, 2014
@fzumstein
Copy link
Member Author

Mac:

  • Can't seem to save the workbook elsewhere than in the current excel folder (full path is interpreted as the name of the file): wb.xl_workbook.save_workbook_as(filename="/Users/Felix/Desktop/test.xlsx").
  • Additionally, when using: wb = Workbook('Workbook1'), wb.xl_workbook is referring to the workbook in lower case (workbook1) and doesn't find it. -> that was a bug in main.py
  • Ah - Classic Mac OS file path: wb.xl_workbook.save_workbook_as(filename='Macintosh HD:Users:Felix:Desktop:test.xlsx') - all good then.
  • Conversion: from appscript import mactypes; mactypes.Alias(u'/Users/Felix/Desktop').hfspath

@bklaas
Copy link

bklaas commented Jan 12, 2015

This is the only direct reference I can find anywhere for save...is it accurate to say that the current released version of xlwings (0.3) cannot save changes at all?

There must be something incredibly hard about saving a spreadsheet, especially xlsx, because looking across the breadth of spreadsheet parsing libraries in Python, Perl, and Ruby, they all seem to have this limitation with xlsx: they either can't save changes or cannot edit an already-in-place xlsx file.

@fzumstein
Copy link
Member Author

save hasn't been implemented, yes. Again - there's a good chance it'll make it into 0.3.1. The thing that is still missing I feel is the possibility to control the working directory from Excel (apart from the Mac version playing funny last time I tried). Same as for your other comment though: If you are on Windows, use this workaround: wb.xl_workbook.SaveAs(r"C:\...\test.xlsx")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants