Paste from Excel to webpage Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Balentay
Posts: 10
Joined: 10 Jan 2020, 00:50

Paste from Excel to webpage

16 Apr 2021, 00:56

Hello!

I need help coming up with a script to paste data from an excel sheet into a webpage cell by cell. I have three rows with 2657 columns each (there were more before I gave up inputting them by hand). The rows are usernames, money donated, and the date. The dates are formatted as 05/30/2015 04:06 PM

I've been searching google, reddit and the forums here for something that would work out. I've tried out different codes but none of them are quite what I'm looking for. I found a code that nearly worked (here) but c.value formats donations with many 0's (50 is 50.000000 for instance) and formats the date as 5/30/15 4:06:32 PM. The code also sends multiple rows at a time.

I would really appreciate it if someone could help me!
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Paste from Excel to webpage

16 Apr 2021, 03:16

You could use :arrow: Round() to validate/convert the floating point numbers.
There are dozens of AHK date&time converters available, go for them or use this crude one.

Code: Select all

t:="5/30/15 4:06:32 PM“
arr:=StrSplit(t,A_Space)
time:=StrSplit(arr.2,":")

MsgBox % "date:`t" . arr.1 . "`ntime:`t" . time.1 . ":" . time.2 . " " . arr.3
Balentay
Posts: 10
Joined: 10 Jan 2020, 00:50

Re: Paste from Excel to webpage

16 Apr 2021, 11:33

Thank you for the advice! I don't know how to put it into practice though- I'm very much a beginner in coding languages.
User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: Paste from Excel to webpage  Topic is solved

17 Apr 2021, 14:28

Use c.text instead of c.value to eliminate the .00000.
Also you said that
The code also sends multiple rows at a time
The script sends the content of one cell each time Rctrl is pressed. So unless your cell contains multiple lines, it should send a single line each time.
14.3 & 1.3.7
Balentay
Posts: 10
Joined: 10 Jan 2020, 00:50

Re: Paste from Excel to webpage

18 Apr 2021, 02:19

@flyingDman Hey thanks so much for the reply! This works perfectly for me c: I really appreciate you helping me out

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mcd, ReyAHK and 243 guests