save-as

Why can't I “save as” an Excel file from my Python code?

落爺英雄遲暮 提交于 2019-12-17 19:43:47
问题 I have an Python ExcelDocument class that provides basic convenience methods for reading/writing/formatting Excel files, and I'm getting a strange error in seemingly simple Python code. I have a save and saveAs method: def save(self): ''' Save the file ''' self.workbook.Save() def saveAs(self, newFileName): ''' Save the file as a new file with a different name ''' self.workbook.SaveAs(newFileName) The save method works perfectly, but when I try to call the saveAs method - myExcelObject.saveAs

Download a file from Servlet using Ajax

岁酱吖の 提交于 2019-12-17 02:32:19
问题 I have created a zip file in my servlet. Now I would like to trigger that servlet using Ajax and prompt the download dialog to the user. I can trigger the servlet, but I don't know how to get the save dialog. How can I achieve this? 回答1: You can't "download a file using AJAX". AJAX is about downloading data from a server for JavaScript to process. To let the user download the file either use a simple link to the file/servlet, or if you really, really need to use JavaScript, then assign the

Using VBA to save a file in excel 2010 with a different name each time [closed]

烈酒焚心 提交于 2019-12-13 11:15:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a spreadsheet that I'm using as a template to get user input. When you press the submit button on the spreadsheet, it sends the data to a different workbook that stores all the previous entries and then clears the template. Is there a way to save the template as a different file when you push the button?

vba script to save workbook overwrites entered filename

人走茶凉 提交于 2019-12-13 06:21:54
问题 With the below entered script I want my workbook to be saved with the name entered by the user, say Sub save_workbook_name() Dim workbook_Name As Variant Dim location As String workbook_Name = Application.GetSaveAsFilename(fileFilter:="Excel binary sheet (*.xlsb), *.xlsb", InitialFileName:="N:\IRi\Periode Rapportage Px") If workbook_Name <> False Then ActiveWorkbook.SaveAs WriteResPassword:="TM", FileFormat:=50 End If End Sub But when I now try to save the file with a different name, lets say

Workbook.SaveAs() to different folder in Office 2011 for Mac

岁酱吖の 提交于 2019-12-12 02:26:40
问题 How to save xls to another folder? When I use "/" in save path it replaces then with ":". When I try to use "\" it saves the file with "\" in file name. 回答1: Use the Application.PathSeparator property and as an added bonus it'll be platform agnostic. myPath = "myDirectory" & Application.PathSeparator & "mySubDirectory" & Application.PathSeparator & "myFileName" 来源: https://stackoverflow.com/questions/7198871/workbook-saveas-to-different-folder-in-office-2011-for-mac

Activate windows of files stored in arrays, but getting subscript out of range error?

♀尐吖头ヾ 提交于 2019-12-12 00:58:22
问题 Sub Merge() Dim File As String Dim AllFiles(), Filename As Variant Dim count, test, StartRow, LastRow, LastColumn As Long Dim LastCell As Variant test = 0 ChDir "C:\" 'Insert suitable directory for your computer ex:ChDir "C:\Users\Jerry Hou\" if file of interest is in "Jerry Hou" Folder ReDim AllFiles(1) Do Application.EnableCancelKey = xlDisabled File = Application.GetOpenFilename("XML Files (*.xml),*.xml", 1, "Select File to be Merged") 'Needs to select in Order to merge files Application

vba: saveas in xlsm fileformat without changing the active workbook

夙愿已清 提交于 2019-12-11 21:05:13
问题 I have the following code which makes copies of the active workbook and gives each copy a different name. It works well, BUT I really need the original worksheet from which the code is run to stay active. If I use the SaveCopyAs function instead, the copied files do not have the correct file format (.xlsm), and you cannot specify the file format as a parameter as in the saveAs function. http://msdn.microsoft.com/en-us/library/bb178003%28v=office.12%29.aspx http://msdn.microsoft.com/en-us

C# excel SaveAs file could not be accessed when saving

自古美人都是妖i 提交于 2019-12-11 13:19:42
问题 Attempting to save an excel worksheet programmatically as a unique filename in a loop. private static DateTime csvtime = DateTime.Now; private static string time = csvtime.ToString("HH:mm:ss"); private static string Path = @"C:\users\User\desktop\MonetaryEntry_"+time+".csv"; mySheet = (Excel.Worksheet)myBook.Worksheets[1]; mySheet.SaveAs(Path, Microsoft.Office.Interop.Excel.XlFileFormat.xlCSV); This fails with the following error An unhandled exception of type 'System.Runtime.InteropServices

Creating Multiple Workbooks from One Workbook VBA

梦想的初衷 提交于 2019-12-11 07:59:42
问题 I am new to this site and this is my first question, so if I didn't set this up correctly please excuse me. Here is some background info. We purchased a digital book with relevant company information. It came as a unformulated excel workbook which was great. This workbook has all the particulars of our current, former, and future customers. We are converting from paper to a computerized file system. Management is bent on using Excel as our Workhorse. Everyone here doesn't know how to use

How can I call context menu for image saving inside Ionic application?

谁说胖子不能爱 提交于 2019-12-11 06:17:01
问题 If I go to Safari mobile (iOS 11+) browser and land on www.google.com - I can long press on google's logo (img element) and call "context menu": Now I want to do the same for an img element inside Ionic's page (regardless whether its PWA or hybrid app). How would I achieve that? I guess Ionic or Angular has a lot of configurations to prevent default behaviors for touch etc inputs, but since I see I can do it with google.com via normal browser I guess we can override some setting and achieve