|
When downloading the data information from a Siemens 224XP PLC into Excel is there a way to format the information automatically and add headers? |
|
I'm not familiar with these PLC's or what you mean by downloading into Excel. But if you want some automation Excel, then VBA is the way to go. You can have a look around for VBA tutorials online, but if you want to get moving quickly, one approach is to record a macro in Excel while you are manually performing the formatting that you want to automate. When you record this macro, Excel actually saves your actions as VBA code as well, so if you're not sure how to do something in VBA, this is like a built-in teacher. I would look over the VBA code that gets generated though, because its not clever enough to figure out what you really want - just what you actually do. So you might have to make some changes to make the code more useful or generic (such as changing absolute cell references to relative references). Then once you have your code ready, I would recommend creating an Excel Add-in to house it. Here is a tutorial (first one I found): http://www.fontstuff.com/vba/vbatut03.htm. The advantage of creating an Add-in, is that the VBA code doesn't have to be in the Excel file with the data - the code is stored on your machine (in an .xla file). Then you can also execute your formatting function from a custom menu in Excel, which is convenient. It's been a while since I've done this, but I'm sure its not overly complicated. |


