154 karma · joined Sep 20, 2023 (3y ago) · 31 submissions
comment 2y ago · link · parent
Dim rng as range: set rng = Sheet1.UsedRange
Dim rows as Long: rows = rng.rows.count
Dim cols as long: cols = rng.columns.count
Const SIZE as long = 500
For i = 2 to rows step SIZE
Dim wb as workbook: set wb = workbooks.add()
wb.sheets(1).range("A1").resize(1, cols).value = rng.resize(1).value
wb.sheets(1).range("A2").resize(SIZE,cols).value = rng.offset(i-1).resize(SIZE).value
Call wb.SaveAs("C:\Temp\" & i & ".xlsx")
nextcomment 2y ago · link · parent
Yeah as said, https://github.com/enso-org/enso seems to be a general purpose functional programming language with visual editor, but otherwise I haven't really seen any no-code solutions worth their salt. I'm not particularly a fan of enso either, but it's the best I've seen.
8.
Ask HN: What are your thoughts on no-code tools like Microsoft's Power Automate?
3 points · by sancarn · 2y ago · 3 comments
comment 3y ago · link · parent
Lots of awesome stuff still in the VBA/VB6 community!
comment 3y ago · link · parent
I, as an SME, am fully happy coding in C#, Java, Rust, whatever! As long as the language is turin complete, is pro-code and versatile enough, I'm all ready to go.
Do note that IT actively chose to develop the solution in Microsoft PowerApps, despite my advising that the solution would be better suited as a web app.
comment 3y ago · link · parent
comment 3y ago · link · parent
I do tend to disagree here. It really depends how invested they are with VBA. Many VBA skills are highly transferrable to Python and other high level programming languages.
I was fortunate to have experience with multiple languages from the start, but many of my colleagues have programmed in other languages other than VBA after learning VBA only to begin with. From Ruby to Python and beyond.
comment 3y ago · link · parent
comment 3y ago · link · parent
Edit: Another big issue with OfficeJS is you need to be able to host a web server. That's not usually something most end users have access to...
comment 3y ago · link · parent
I have already built my own code interpreter in VBA to make Lambda syntax possible: https://github.com/sancarn/stdVBA/blob/master/src/stdLambda.... so I know it's definitely possible, just haven't figured out WASM yet...
comment 3y ago · link · parent
IMO, companies should have a language of choice which is actively encouraged to be used by everyone for all automation needs. Different departments build libraries to automate aspects of their jobs and other departments can use them if needed. I.E. it becomes yet another tool, just like Excel.
comment 3y ago · link · parent
It shouldn't be a spreadsheet. The IT departments should democratise the tools which devs use, so even end-users can use modern tools for the job at hand. Then popping a user-made tool into your processing pipeline would be fair enough, and code can be collaboratively maintained. In the end, just as IT wouldn't want SMEs making changes without their knowledge, SMEs wouldn't want IT changing their core system without their knowledge either.
In my opinion, the more people who know and understand the core systems, the better.
Edit: for what it's worth, I do use github (https://github.com/sancarn/stdVBA), but you won't see nearly any versions of any corporate codebases, why? Git doesn't work great with VBA spreadsheets at all. I'm not going through a 10 step process to upload the updated file to the github repo every time I update a macro in a spreadsheet. This is why on-board git is important.
comment 3y ago · link · parent
JScript is deprecated, and is likely to be removed at some point too...
CMD is often blocked on many people's machines due to group policy.
PowerShell is really the only other option other than VBA, as discussed in the article. Only reason I haven't used PowerShell til now is the version was hidiously outdated and didn't even support classes... Of course with PowerShell you can evaluate C# code.
comment 3y ago · link · parent
The reality of the situation is with proper IT support, there could be compiled Excel Addins which provide API connections to core systems such that proper authentication also takes place. But that requires a first step by IT. Either that or authentication via a web server to get a temporary connection string. Either way, it requires prior infrastructure.
comment 3y ago · link · parent
Generally I update them with client-ran JavaScript. I love sharepoint lists for their ease of use to users, but the limitations are pretty rubbish if ever you want to do anything programatically, unless you can figure out how to authenticate (and/or use a library which handles that for you).
comment 3y ago · link · parent
VB6 has a pretty big community, and https://twinbasic.com/ has really helped unify VBA and VB6 communities as of late. So it might have a little of a resergence in the dev community.
comment 3y ago · link · parent
comment 3y ago · link · parent
In case you were interested :P (I say compiler, it compiled to byte code, not asm.)
29.
Why do people still use VBA?(sancarn.github.io ↗)
324 points · by sancarn · 3y ago · 408 comments
comment 3y ago · link · parent
A running application should not, by default, have access to everything on disk (and every program running on the PC too). You will never annihalate every attack vector, especially when the limiting factor is dumb users.