I'm new to perl and I've already gone through a crash course on the basic of perl scripting! However, the stuff I wanna do seem to be a bit too advance for me now. (Cries in agony) I wish to do the following actions but I'm stucked at opening an .xlsm excel file. Note I have an array stored with string text.
- Open .xlsm excel file
- Search for the location of the cell that contains a string text throughout the .xlsm that matches the string text in my stored array
- Write a char into a same row but different column cell. (Example: Matched string location of cell in step 2 = K8. Write cell in F8)
- Repeat foreach of string in my array.
Linux Version: Red Hat Enterprise Linux 8.6 Thanks guys for your time reading/helping! Much appreciated!
Tried the traditional open(). (I know its wrong! I'm sorry! haha)
I am not aware of any Perl module on Linux that allows writing to
.xlsmfiles (you can read an.xlsmfile using Spreadsheet::ParseXLSX, but not write).If you are on Windows you could probably write to an
.xlsmfile using the Win32::OLE module.If you want to learn Perl programming you could try create such module yourself, I think it would be fun. Or try to modify the
Spreadsheet::ParseXLSXmodule such that you will be able to save the modified file also. Be aware though that such a project could take several months if you are a beginner.However, if you are more interested in the modification of the .xlsm file and do not have months to spend on learning about the OpenXML standard, I would recommend a shortcut: The Python module
openpyxlwhich can be used on Linux: