excel

Changing delimiter in a loaded csv file

橙三吉。 提交于 2021-01-29 16:40:31
问题 I have loaded a csv file in memory. My csv file uses ";" as the field delimiter. It seems vba default delimiter is "," because when I try to access certain row and column of the loaded csv file, vba advances through the elements with refrence to number of "," used. example: In the 10th row of my data there are five columns: aa 12,34 bb 5,678 (here "," is decimal separator) in the csv file which the delimiter is ";" it looks like this: aa;12,34;bb;5,678 so when I write MyData(10,2) I am

Transferring Excel Data to Unity

回眸只為那壹抹淺笑 提交于 2021-01-29 16:40:10
问题 I have a large list of data in an excel spreadsheet that I need to transfer a few arrays in my Unity project. I have been looking up a few methods and will likely try out a few of them, but I had another question. Is it possible to transfer Excel data to Unity arrays without an additional plug in or tool? Just with base Unity? 回答1: As @julienkay says, if the excel file is a .csv could be treated as a plain text file, BUT what if not? If you are working with .xlsx I recommend to use Microsoft

How to use excel vba to click on interactive dialog pop-up?

拥有回忆 提交于 2021-01-29 16:26:11
问题 I am trying to use excel vba to navigate and export data from this website. I am able to click on 2018, 2019 buttons and the setting option, but unable to click the 'export data' option with vba. I attach my code below for your reference. Option Explicit Sub GetURLOfFrame() Dim IE As New SHDocVw.InternetExplorer Dim webpage As MSHTML.HTMLDocument IE.Visible = True IE.navigate "https://www.epa.gov/fuels-registration-reporting-and-compliance-help/rin-trades-and-price-information" Dim t As Date,

Power Query - M Language: Sum with Group By for multiple columns

佐手、 提交于 2021-01-29 16:22:46
问题 I'm looking to write a DataTransform for an imported csv file which performs the following: GroupBy: State Action: Sums all columns The Input data looks like: The output I'm looking for would show a row each State, a column for each date, and the sum for that date. Just using the Table.Group and List.Sum, I'm able to get this for specific dates: = Table.Group(#"Change Dates to Num", {"Province_State"}, {{"4/19/20", each List.Sum([#"4/19/20"]), type number}, {"4/20/20", each List.Sum([#"4/20

ADO recordset crashes while evaluating EOF after Excel upgrade

风格不统一 提交于 2021-01-29 16:22:16
问题 I have an Excel sheet that connects to a Basis database using an ODBC connection. It worked fine when we were running Excel 2010 on Windows Server 2008, but then we upgraded to Excel 2016 on Windows Server 2016, and it doesn't work anymore. Here's some code that demonstrates the problem: Public Sub cnntest() Dim cnn As ADODB.Connection Dim sql As String Dim rs As ADODB.Recordset Set cnn = New ADODB.Connection cnn.Open "DSN=redacted;UID=redacted;PWD=redacted;" sql = "SELECT ITEM FROM IC_ITM

How to transfer an excel spreadsheet to an access database

﹥>﹥吖頭↗ 提交于 2021-01-29 16:14:28
问题 I'm making a program to track my weight, calories I eat in a day, and the date, to help me lose weight. I'm manually putting in these values into a spreadsheet with those three columns (date, calories, weight). I want to transfer the information in these three columns into an access database. Code so far: Sub transferdata() Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset connStr = "C:\Users\sachu\Desktop\Assignment 5\CalorieDatabase.mdb" providerStr = "Microsoft.ACE.OLEDB.12.0"

Apache POI throwing OOM error when trying to password protect modest sized XLSX workbooks (~=80MB)

穿精又带淫゛_ 提交于 2021-01-29 16:14:21
问题 using java 8 and apache POI and POI-OOXML 3.14 Here's my method: private static void encryptXlsx(String inputPath, String outputPath, String password) throws IOException, InvalidFormatException, GeneralSecurityException { //create a new workbook Workbook wb = WorkbookFactory.create(new File(inputPath)); //Add password protection and encrypt the file POIFSFileSystem fs = new POIFSFileSystem(); EncryptionInfo info = new EncryptionInfo(EncryptionMode.agile); Encryptor enc = info.getEncryptor();

Turn off enable calculation

不羁的心 提交于 2021-01-29 16:13:29
问题 I have a workbook with a lot of different formulas and I have one worksheet in it called Map, that I need to not auto calculate, every time I enter new data into a different worksheet. I have the following VBA code below on this worksheet. The problem is I need to manually go to the Developer tab, Properties, EnableCalculation, and select False. When I do it this way, the code works perfectly. However when I close and re-open the workbook, the EnableCalculation in the Properties, has been

Excel VBA - Access Website, generate report & press save on IE dialog bar

放肆的年华 提交于 2021-01-29 16:13:09
问题 I have a question regarding a topic that is already discussed in some other threads and forums but I do not manage to make it work for me. So I came here to ask that questions concerning my individual code. Basically, I access an intranet-site and based on some input (via checkboxes) a report is created with data from SAP. My problem arises after the report is generated and IE prompts me to press the "save" button on its dialog box. I do not manage to automate that part. Could you help me

VBA Excel instance doesn't close when opened from MS Access - late binding still same error

馋奶兔 提交于 2021-01-29 15:37:29
问题 here's my original post VBA Excel instance doesn't close when opened from MS Access - late binding it was answered and i didn't realize that the xlsm file still isn't closed when I accepted the answer. The reason why this is such a huge problem, is because when there's an open ghost .xlsm file, the next .xlsm file that opens doesn't run the startup macro. so, all my automations are failing because the previous .xlsm is sitting in memory. So, I have many automations scheduled to run. They're