Does anyone have a function written or know how to translate an entire Excel sheet? Want to avoid doing this cell-by-cell, as I'm working with a lot of data. Also can't use third-party services as I'm handling sensitive information. I'm very much a newbie to Excel, so I probably won't be able to do anything complicated on my own.
Related
I have around 30 Excel spreadsheets, each with 20+ worksheets. Each of these worksheets follows the same basic format, though there are slight differences. I also have a Google doc with sections that match each of the worksheets.
Somehow I need to merge the data from the spreadsheets and the Google doc into a single, searchable, editable document, which will become the new safe source, eliminating the need to maintain 600+ worksheets.
So far, the plan is to have an intern copy/paste from Excel into the appropriate section in the Google doc, but besides being akin to torture, I'm afraid this approach will take days.
Can anyone think of a way to automate at least some of this?
I've been thinking that if I could somehow take all of the Excel data and migrate it into either Microsoft Word or a Google Doc, that would be a good first step.
I have used Google Apps Script in the past and could probably figure out how to write a macro in Excel, but I can't wrap my head around how I would actually accomplish what I need to do.
I'd appreciate any suggestions.
Wanted to provide an update in case anyone else ever has a similar problem...
I ended up moving all of the existing spreadsheets to Google Drive and using Google Apps Script to iterate through the folder to get the name and id of each file and then iterate through all worksheets of each of those spreadsheets, copy all data from each sheet and append it to a new master spreadsheet.
I then migrated the existing Google Doc to a Google Sheet so I could sort.
After that I manually copied the applicable sections from this Google Sheet into the correct, corresponding section of the master spreadsheet. I'm sure someone smarter than me would have been able to script that last part as well, but I was having trouble figuring out the logic and decided to brute force the last step.
So I have never used Excel macros before, and am not experienced in this, but have a (very) rough idea of how things work. I have tried looking up solutions but too inexperienced to convert them to my situation.
I have to import data from many excel files into one main database, and have this going at the click of a button, as there are new files being generated daily.
I can set up the data files to have the values in a consistent format on the first sheet of the file, as a start. From there I am not sure of the coding I need to use to get the data imported to the database file and append it to the bottom of a list.
Any help would be greatly appreciated.
By "one main database" are you referring to an actual database (e.g. SQL Server) or an Excel file. If an excel file, I'd use PowerQuery for this. It's built into Excel 2016, available as a free add-in for Excel 2010/2013, and designed so that non-coders can do incredible data cleaning and prep work from a fairly easy-to-use UI built right into Excel. Plenty of tutorials on the web and youtube, as well as great books such as M is for Data Monkeys by Ken Puls.
I could not find an answer to this, neither on Stack or on the wild web. I have a sheet where I need users to be able to use Text to Columns, however, I also need to protect the sheet. Everything works fine if Excel automatically does this (from Text to Column "short-term memory"), but I cannot access the option when protection is enabled.
It is not that any text is spilling onto locked cells, it's just that the option is greyed out after protecting the sheet. I would appreciate a non-VBA answer as I do not want to use macros on a shared file (the server is extremely slow and even normal excels take ages to save). However, if absolutely necessary, can you ninjas please tell me how I can set it up so that this problem is solved with the least possible performance hit?
P.S.: I am pretty new to VBA (practically uninitiated, I prefer R for everything). Also, the shared server is basically a network folder, so it is not likely that it will cause any issues other than being super-sloth.
If you protect a sheet, then only unlocked cells can be edited, that is, users can change the cell manually.
That is the core and purpose of sheet protection.
In a protected sheet you will not be able to perform a text to columns manually.
Whether or not the file lives on a server is totally unrelated to using VBA for a solution.
The real question is: What are you trying to achieve? Your question is about running Text to Columns on a protected sheet, but if you step back from that particular approach, there may be other ways to achieve what you really need to do.
I have a xls with some data, which i need to correct. For example: fix common typos, replace '4 parts' with 'four parts' etc.
Replacement rules are big key=>value arrays. So i just loop through them and do replacements.
I'd like to store those rules in single .yml files and load them in arrays as soon as my macro starts. I think it's easiest way to maintain them, because they are updated frequently. Unfortunately, vba seems to not have yaml parser.
Is there another way to keep my configuration beyond the macro?
Your Macro can be housed in another spreadsheet that is called to run on your target spreadsheet. So storing your rules in the Macros spreadsheet is possible. Editing the rules may not be as easy later, I kinda loath doing multi-line typing in Excel, but if you need a quick accessible data store it works.
Edit: And in reading your question again I see that you want to store this separate of the Macro. You could try json:
Is There a JSON Parser for VB6 / VBA?
A friend of mine has a very complex Excel spreadsheet with many formulas and lots of data that he uses for work. He wants to put a custom GUI on top of it and then wants to sell it to other people in his profession. Basically he wants to make some freestanding software out of his spreadsheet? Is there any way to put a custom GUI on top of an Excel spread sheet? The spreadsheet would just reside in the backend and be a kind of database and do the calculations necessary. I know this is definitely not an elegant solution but I told him I'd look into it. Any ideas?
I use Clear Office.
You can host workbooks in your GUI, host GUI in your workbook. All .NET, no interop.
Excel Interop fits the bill. Code your GUI with WinForms/WPF and .NET; invoke excel in the background to be your calculation engine. Pretty ugly (and probably slow) solution, though.
Check out the book Professional Excel Development by Bovey. It talks about how to do some radical Excel customizations along the lines of what you are suggesting.
Depending on how complex the application/input is, he may be able to use userforms, which are built in to Excel. Alternately, he can set up a sheet as in input form, and use other sheets for data/calculations, and super-hide them. We made a spreadsheet for a company at work, and used both solutions. Userforms can be frustratingly inflexible, but they work.
You can also add in some VBA to show the Userform when the workbook is opened, although if macros are disabled (which they are by default) then it won't work.