Questions tagged [xlsm]

.xlsm is one of the file extensions for files created by Microsoft Excel (Excel 2007 or later). This format can store macros written in VBA.

Starting from Excel version 2007, Microsoft changed the format of the Microsoft Office files.

Formerly, Microsoft used the BIFF (Binary Interchange File Format) binary format (.xls, .doc, .ppt). It now uses the OOXML (Office Open XML) format. These files (.xlsx, .xlsm, .docx, .docm, .pptx, .pptm) are zipped-XML.

.xlsx is the new default Excel format, it cannot contain any VBA (for security reasons as stated by Microsoft).
.xlsm is the new Excel format that can store VBA and execute macros.

270 questions
0
votes
1 answer

running python xlwings library and it fails COMRetryObjectWrapper(DispatchEx('Excel.Application'))

I have a code which basically manipulates xlsm file, presses a macro button, and then force closing it (using psutil) the process is: open xlsm file (MyExcel.xslm)==> write data ==> press macro button, save==> force close (with psutil). and the…
Danny Kaminski
  • 191
  • 2
  • 15
0
votes
1 answer

Apache POI to keep predefined macros after editing

I have XLSX and XLSM files which contains some predefined macros. I try to use Apache POI to edit these files, but macros are removed automatically. I get a notification window when I try to open file after modification, that files are removed,…
plaidshirt
  • 5,189
  • 19
  • 91
  • 181
0
votes
2 answers

Cut and paste a set of rows to allow a new blank row

I am putting together a project management excel spreadsheet (my company won't fork out for licenses for everyone to have access to anything like MS Project or suchlike, and I'd like something everyone can use), and would like the user to be able to…
Jimbo100
  • 5
  • 2
0
votes
1 answer

Finding position of a text in a paragraph using VBA

I have a given text and a paragraph, the exact text is present in the paragraph. Considering first word with index 0, second with index 1 and so on.. I want to find the start and end index of the text in the paragraph. I am written the code for…
andro
  • 37
  • 8
0
votes
1 answer

.xlsm file not considering the regional list separator as pipe but taking comma by default

I have a scenario where db2 SQL query should fetch the data in to a CSV file and the csv file's data should be separated with a pipe delimiter, I have done that by using regional settings change in control panel by changing the List Separator to |…
Jay
  • 1
  • 1
0
votes
1 answer

VBA - The code to complete 0 is missing after converting a file to csv format

I have 2 commands to add 0 to number (8 digits, 9 digits required), and 0 addition to cell phone numbers (9 digits beginning with 5 digits need to be 10 digits): 1.Add 0 to 8 digits : Sub Add_Zeros() Selection.NumberFormat = "@" For Each CL…
JossephA
  • 1
  • 1
0
votes
1 answer

Automating Excel VBA Code changes for several users

I have created an Excel workbook with lots of code behind the scenes. Occasionally I need to update the coding. Typically, I create a new version of the workbook and save it to each individual's personal network drive. In a perfect world, they…
exceldude2001
  • 141
  • 2
  • 2
  • 13
0
votes
1 answer

Open Excel file with parameter using PowerShell

I've got a requirement to fetch a last created .xlsm file from a particular folder. I managed to achieve it using the below powershell code: $dir = "\\test\folder1\" $latest = Get-ChildItem -Path $dir *.xlsm | Sort-Object CreationTime -Descending |…
user1800674
  • 223
  • 1
  • 7
  • 18
0
votes
0 answers

Update .XLSM without loosing format

I'm trying to update an excel .xlsm with macros. Which library is best for this? I'm using at the moment Openpyxl, but it doesn't work properly. The following lines work, but the saved excel looses a bit of format (borders and I'm afraid it will…
0
votes
1 answer

Force Excel to run macro using SQL Query

I have a requirement to run the Excel file (either .xls or .xlsm) which has macros in it and it reduces the size of the other excel file and save it as different file in same folder. It works fine when I open the file manually from the folder, it…
Mansang
  • 15
  • 6
0
votes
0 answers

Java Read Excel File via FileDialog

I get an IOException with the code below. Whats the problem? What I want is to Read an Excel File xlsm and xls or xlsx via the filedialog after the import read the excel and work with it. public class start { public static void main(String[] args)…
sharpnado
  • 79
  • 1
  • 1
  • 15
0
votes
3 answers

work with .xlsm c#

I tried to use Spire.Xls library, but it does not support .xlsm and when i convert it to .xlsx hasn`t saved it, same with Microsoft.Office.Excel.Interop. private void button1_Click(object sender, EventArgs e) { //string xlsm =…
Dima Morgunov
  • 17
  • 1
  • 7
0
votes
1 answer

VBA Workbook.SaveAs Error:1004 Require variable path and file names

EDIT: NEW BEHAVIOR - Relocating the master XLSM to a new starting directory caused all issues to disappear. Placing the XLSM into a newly created (but same name) directory in its original location had maintained no issues as well. I am using…
0
votes
1 answer

Having a user choose where to save an Excel workbook

I currently have a macro that will read data, print a results sheet, and then copy the data and results to a different workbook that is then saved as a regular .xlsx file as opposed to .xlsm. My code to save that book is as…
Matt Gaydon
  • 117
  • 1
  • 13
0
votes
0 answers

Convert any xls-xlsm files to Google Sheet format and overwrite the oldest existing GS file with that name

I decided to open this topic because there is very little material in this regard and in my opinion many are asking the same question. I'm trying to write an script to convert an .xls or a .xlsm file stored on Google Drive to a Google Sheets file.…
Giovanni
  • 3
  • 1
  • 5