excel

HTML Table to XLS (Cell used for a formula)

牧云@^-^@ 提交于 2021-02-07 03:49:24
问题 I am doing an HTML table and I want it to be converted to XLS file I am using this table for example <table> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>EUR</td> <td>300.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>200.00</td> </tr> <tr> <td>AUD</td> <td>**=SUM(A2:A10);**</td> </tr> </table> Is there a way how I can create a cell with the

Setting an Excel Range with an Array using Python and comtypes?

我怕爱的太早我们不能终老 提交于 2021-02-07 03:48:38
问题 Using comtypes to drive Python, it seems some magic is happening behind the scenes that is not converting tuples and lists to VARIANT types: # RANGE(“C14:D21”) has values # Setting the Value on the Range with a Variant should work, but # list or tuple is not getting converted properly it seems >>>from comtypes.client import CreateObject >>>xl = CreateObject("Excel.application") >>>xl.Workbooks.Open(r'C:\temp\my_file.xlsx') >>>xl.Visible = True >>>vals=tuple([(x,y) for x,y in zip('abcdefgh'

Setting an Excel Range with an Array using Python and comtypes?

爱⌒轻易说出口 提交于 2021-02-07 03:48:18
问题 Using comtypes to drive Python, it seems some magic is happening behind the scenes that is not converting tuples and lists to VARIANT types: # RANGE(“C14:D21”) has values # Setting the Value on the Range with a Variant should work, but # list or tuple is not getting converted properly it seems >>>from comtypes.client import CreateObject >>>xl = CreateObject("Excel.application") >>>xl.Workbooks.Open(r'C:\temp\my_file.xlsx') >>>xl.Visible = True >>>vals=tuple([(x,y) for x,y in zip('abcdefgh'

Setting an Excel Range with an Array using Python and comtypes?

淺唱寂寞╮ 提交于 2021-02-07 03:47:57
问题 Using comtypes to drive Python, it seems some magic is happening behind the scenes that is not converting tuples and lists to VARIANT types: # RANGE(“C14:D21”) has values # Setting the Value on the Range with a Variant should work, but # list or tuple is not getting converted properly it seems >>>from comtypes.client import CreateObject >>>xl = CreateObject("Excel.application") >>>xl.Workbooks.Open(r'C:\temp\my_file.xlsx') >>>xl.Visible = True >>>vals=tuple([(x,y) for x,y in zip('abcdefgh'

Insert picture into Excel and keep aspect ratio without exceeding dimensions with VBA

限于喜欢 提交于 2021-02-07 03:30:56
问题 I am exporting data from an Access database into an Excel report, and part of what needs to be included in the report are pictures corresponding to the data. The pictures are stored in a shared file and are inserted into the Excel file like so: Dim P As Object Dim xlApp As Excel.Application Dim WB As Workbook Set xlApp = New Excel.Application With xlApp .Visible = False .DisplayAlerts = False End With Set WB = xlApp.Workbooks.Open(FilePath, , True) Set P = xlApp.Sheets(1).Pictures.Insert

Scraping an AJAX page using VBA

北战南征 提交于 2021-02-06 13:59:49
问题 I've been trying to Scrape the entire HTML body and assign it as a string variable before manipulating that string to populate an excel file - this will be done on a a loop to update the date every 5 minute interval. These pages are AJAX pages, so run what looks like JavaScript (I'm not familiar with JS at all though). I've tried using the XMLHttpRequest object (code below) but t returns the JS Calls: Set XMLHTTP = CreateObject("MSXML2.serverXMLHTTP") XMLHTTP.Open "GET", "https://www.google

Scraping an AJAX page using VBA

雨燕双飞 提交于 2021-02-06 13:59:16
问题 I've been trying to Scrape the entire HTML body and assign it as a string variable before manipulating that string to populate an excel file - this will be done on a a loop to update the date every 5 minute interval. These pages are AJAX pages, so run what looks like JavaScript (I'm not familiar with JS at all though). I've tried using the XMLHttpRequest object (code below) but t returns the JS Calls: Set XMLHTTP = CreateObject("MSXML2.serverXMLHTTP") XMLHTTP.Open "GET", "https://www.google

read the excel file from the directory not from the address that you given

情到浓时终转凉″ 提交于 2021-02-06 12:48:47
问题 I am using html5 and javascript. I want to read the Excel file which is chosen by the user from the directory (using a file dialog) but all I know is to read an excel file by the given path: function readdata(y,x) { try { var excel = new ActiveXObject("Excel.Application"); excel.Visible = false; var excel_file = excel.Workbooks.Open("D:\\Test.xls"); // alert(excel_file.worksheets.count); var excel_sheet = excel_file.Worksheets("Sheet1"); var data = excel_sheet.Cells(x, y).Value; //alert(data)

Is there a way to count elements in a VBA enum?

自作多情 提交于 2021-02-06 11:58:51
问题 is there a proper way to count elements of an enum in VBA ? At the moment, I leave an enum value such as KeepThisOneHere in the following example Enum TestEnum ValueA ValueB ValueC KeepThisOneHere End Enum I use the last value to know the size... I don't like this solution, because I am not sure I have a guarantee the values will always be indexed the same way, and the code might be changed by a third party who might add values after this last special one, silently breaking the rest of the

Is there a way to count elements in a VBA enum?

回眸只為那壹抹淺笑 提交于 2021-02-06 11:57:16
问题 is there a proper way to count elements of an enum in VBA ? At the moment, I leave an enum value such as KeepThisOneHere in the following example Enum TestEnum ValueA ValueB ValueC KeepThisOneHere End Enum I use the last value to know the size... I don't like this solution, because I am not sure I have a guarantee the values will always be indexed the same way, and the code might be changed by a third party who might add values after this last special one, silently breaking the rest of the