Copy SYLK formatted text to clipboard from HTA - excel

I'd like to programmatically copy tabular data (both formatting and formulas) to the clipboard from an HTA (HTML Application), to paste into Excel. Excel supports a text format called SYLK for accomplishing this task, but I've run into a snag with over-validation in window.clipboardData.setData(format, data) where format is restricted to either "Text" or "URL", giving the error "Unexpected call to method or property access" if format is set to anything else, and Excel only recognizes SYLK text if format is set to "SYLK", otherwise it pastes as normal text.
I'm wondering if there's another way to set clipboard data from an HTA, such as through a COM control that comes preinstalled with either Windows or Office, that would let me copy SYLK data to the clipboard.
I know I could write a custom COM control and install it on each client, but at that point I might be better off just writing to a file and opening the file instead of using the clipboard.

Related

Using applescript within VBA to use safari

I was trying to run a VBA Excel Macro on my mac that sends commands to other apps (explorer).
I figured this doesn't work on the mac, and found that applescript is a bypass solution, but I don't have a clue on how to create one or even call it from excel, so here it goes: I have an excel file with data and the macro opens an website on IE, inputs this data on a certain point, then go back to the excel file and puts an ok beside the data telling that it was done (looks simple).
How do I do this using applescript? In short, I need it to gather some info on the excel file, then input this data on an specific field of a webpage (and click ok) and then go back to excel and there I think I could go back to using VBA again until another loop.

Pasting charts from Excel with large files

I am having trouble when pasting some charts (not as a picture) from Excel into powerpoint. The problem is that the file is very large and a powerpoint which should be roughly, 200kb is around 20MB.
I was wondering if there was a way around this whereby you could paste it, but not as a picture?
You need to use Special Paste, and paste as Microsoft Graphic Object
(if you want to be able to edit it, i.e. change font, sizes, ...).
If you use the regular paste , it'll be linked and with embedded data, that is why it is so heavy!
Regretably, you canNOT change the default paste option in powerpoint like it possible in ms-word...

Copy formatted cell contents from Excel to Word without clipboard

I would like to know if it is possible to transfer the contents of a formatted Excel cell to Word without the use of the clip board.
Using a macro to copy and paste works great - but it interferes with the users clipboard, rendering their PC / Workstation a bit useless.
I have done some background research into a property called WordOpenXML
https://msdn.microsoft.com/en-us/library/microsoft.office.tools.word.document.wordopenxml%28v=vs.120%29.aspx?f=255&MSPPError=-2147217396
My thought process would be to spawn an Excel copy and open the spreadsheet access the inner xml of the Excel cell (or the Open XML) and just set the Property in Word.
That way I know it has transferred like for like - with no use of the clipboard.
Maybe there is another approach - I wondered about spawning a separate clipboard object.
You could try to store what's inside the clipboard in a variable at the beginning of the macro. At the end after your copy/paste action you could restore the clipboard to it's original state.

What clipboard formats does SAP read?

We have an automated process that interfaces with the SAP GUI via Excel, copying table data from an Excel spreadsheet into the Windows clipboard and then pasting it out to an SAP "multiselect" modal window. I would like to bypass the use of Excel by directly sending data to the clipboard in the appropriate format, but it isn't clear what formats SAP can read, and my Google searches all just turn up information on how to press the clipboard-related buttons.
I have already written code to access the GUI directly and write the values to the multiselect table, but this way is much slower than using the clipboard. Any information on how to speed this process up would be greatly appreciated, whether it pertains to the appropriate clipboard format or some other way to rapidly transfer the data.

Copy web content from Outlook to Excel using VBA

My client receives an email with a one-time-access url each day (it can only be accessed once, and only on that day).
Content from this url is plain text formatted as a .csv (actually tilda sv) file, but that is not of relevance here.
The content is then (manually) copied and pasted into Excel sheet, where some (formatting) macros are applied (to get rid of tildas and put data into cells).
Also, few of the first rows of the content are irrelevant, i.e. only lines 5-end are copied into Excel.
My question is the following - is it possible to write a VBA in Outlook to
open the url provided in the given email
copy the content from the webpage (and remove those first couple of lines)
open Excel and paste it there (and apply formatting afterwards)
I found some answers on how to copy/paste content from the email itself into Excel sheet, but didn't manage to sort out how to do it from a url/webpage.
Yes it is possible
I am not expert on VBA, but I do little programing to reduce daily task
I can show you the steps:
create rule that triggers VB script when email arrives.
In the VB script in the outlook, write code that would open excel
pass the connection string
set the R1C1 as destination cell
Save the file as date variant .xls
Make sure outlook is open. This would not work if outlook is not open

Resources