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
2
votes
1 answer

Why doesn't formatting for xlsm in R xlsx work?

So I am trying to load data and write it to an xlsm, but the formatting doesn't seem to work. It is writing rows with no borders (even though the template file has formatting), and I have tried locking the file to prevent editing. Nevertheless it…
mlanier
  • 167
  • 2
  • 3
  • 14
2
votes
0 answers

How to write data into a macro-enabled Excel file (write.xlslx corrupts my document)?

I'm trying to write a table into a macro-enabled Excel file (.xlsm) through the R. The write.xlsx (openxlsx) and writeWorksheetToFile (XLconnect) functions don't work. When I used the openxlsx package, as seen below, the resulting .xlsm files ended…
R_XSLM
  • 21
  • 1
2
votes
1 answer

Unable to write and save XLSM file with Apache POI

I have an existing XLSM file, in which I try to write data with use of Apache POI. String File = GlobalVariables.XLSM; try { Workbook workbook; workbook = new XSSFWorkbook(OPCPackage.open(GlobalVariables.XLSM)); Sheet sheet =…
plaidshirt
  • 5,189
  • 19
  • 91
  • 181
2
votes
2 answers

How to find out what makes poi corrupt a xlsx / xlsm file

I have the issue that Apache POI "corrupted" a xlsm / xlsx file by just reading and writing it (e.g. with the following code) public class Snippet { public static void main(String[] args) throws Exception { String str1 =…
Kai
  • 700
  • 7
  • 33
2
votes
1 answer

Poi: Saving an excel file as xlsx after opening it from xlsm

I'm writing a java program that opens a user-defined excel file, fills it with data, and then saves it under a user-specified path, file name and extension. It should be, but isn't, possible to declare the output to be saved as xlsx, even though the…
Arne Peeters
  • 33
  • 1
  • 5
2
votes
1 answer

how to save a sheet in VBA

I'm building a form that when you fill it up, it should generate 2 files as output. In order to do that I have 2 sheets in the background that I fill up depending on what the user entered a button to save them (as csv). This is the code for saving…
T.G.
  • 743
  • 3
  • 6
  • 27
2
votes
0 answers

Duplicate worksheets using OpenXlsx with file .xlsm

I'm using the basic functions of openxlsx package for writing data on excel file. When I use .xlsx files for writing data, there is no problem. When I try to use .xlsm (files with macro) for writing data, after saving the .xlsm file, there is a…
Mav21
  • 21
  • 3
2
votes
1 answer

Use epplus to create .xlsm file

I'm trying to have a website export a .xlsm file and I can't seem to find anything that helps. Here's a simple example I'm using to test building a .xlsx file (which works). @using OfficeOpenXml;
Michael
  • 75
  • 1
  • 6
2
votes
1 answer

Macro to convert .xls to .xlsx crashes Excel

My goal is to convert a directory full of .xls files to .xlsx files while preserving embedded images. An automated solution is required because the intended set of files is several hundred. My test set has 532 .xls files. Opening the files one at a…
dabell
  • 60
  • 10
2
votes
0 answers

Excel 2010 - 'The image part with relationship ID rId1 was not found in the file.' When copying sheets of a workbook into another workbook

I have a source excel workbook (XLSM format) that has sheets containing images. These sheets are programatically copied into another(target) workbook (XLSM) using VB.NET late binding. After all the copy is done i save the workbook and launch it. In…
teja_98666
  • 85
  • 1
  • 11
2
votes
1 answer

Sorry, we couldn't find Test.xlsm. Is it possible it was moved, renamed or deleted?

I am running a macro code from my C# application. I have placed the Test.xlsm file in the project itself with Properties: Build Action: Content Copy to Output Directory: copy always. However, I get the below exception, when I run the code. Sorry,…
Learner
  • 93
  • 2
  • 11
2
votes
0 answers

performance decreses after 45k record, when rewriting excel (.xlsm) file from java resultset

This code works perfectly for records below 35k and write data on Sheet but if record exist 45k performance slow down and dead without any exception or error, and doesn't create any file. how can i overcome this issue? public void…
Rikhi Sahu
  • 655
  • 1
  • 7
  • 19
2
votes
1 answer

How can I Rewrite .xlsm file using Apache POI?

I am using this code to rewrite xlsm files using Apache POI. I have to rewrite data on Sheet1 from resultset, this code creates copy of template xlsm file and does all the processing. But when I open the created xlsm file it shows me this…
Rikhi Sahu
  • 655
  • 1
  • 7
  • 19
2
votes
1 answer

Reading template xlsm and writing large data to existing worksheet using SXSSF (POI)

I am able to read existing xlsm using XSSF and write data into worksheet using SXSSF. Finally output it as another xlsm with Outputstream. SXSSF is mentioned for writing xlsx in documentation Is it right approach to read and write xlsm for huge data…
Sva
  • 115
  • 1
  • 12
2
votes
1 answer

Formula for Multiple Criteria

Good day all. Have a headache worksheet.Plus I am something of a newbie at excel. I have a sheet with varying ranges. Each value that is to be displayed, depends on a value entered in two other cells. For example: Cell A14 = Item Description (drop…
flavius
  • 21
  • 2