macros – How to automate save excel file as CSV and run live updates

For starters – I am raw and have limited skills, thus the guidance here is important to me.
We have to supply data to a 3rd party in CSV format. The data must be updated at frequent intervals with a time stamp.Some workbooks at 1 minute intervals and other at 30/60 minute intervals.
To ensure that data is permanently available I have done a little batch file to start the excel file.
Our normal method of collecting data is via excel.
I am able to get the data to update at at frequent intervals (10 seconds) courtesy Mr Google with a macro.The Macro also starts automatically on open event.

Private Sub Workbook_Open()
Application.OnTime DateAdd(“s”, 10, Now), “Calculate_Range”

End Sub

I have however run into issues when trying to save this to CSV file – the guidelines found thus far does not help me to have this process run unattended. I have managed to get past the overwrite query, but when I tried the format acknowledgement it fails.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.Run “VBATest.xlsm!Calculate_Range”
ChDir “E:PI”
ActiveWorkbook.SaveAs Filename:=”E:PIVBATest01.xlcsv”, FileFormat:=xlCSV, _
Application.Run “VBATest.xlsm!Calculate_Range”

End Sub

What I need to accomplish is to

  1. run the excel file automatically – the batch file can be added to scheduler to restart this
  2. Update the values at preset intervals – the macro I have now, can run this
  3. Save sheet as CSV file automatically without intervention required (overwrite and format compatibility)
  4. Restart the excel file – batch file in scheduler if there is now other better method.

Thank you for your feedback

file recovery – How to get photos with smart previews out of Lightroom if the original photos cannot be located?

In some circumstances, exporting the image will work. The exported image will usually be lower-quality than the original, as this is how smart previews are stored by Lightroom.

However, sometimes, the images will not be exportable even with a smart preview. In these situations, you should go find your smart previews.

Where Smart Previews are Stored

The smart previews are stored in the Lightroom Catalog Smart Previews.lrdata folder in your Lightroom catalog folder. For more information on where Lightroom catalog folders are stored, please visit this Adobe FAQ.

Inside the folder, there are other folders, from 0—F. Inside those folders are even more folders. Inside these deep folders are the Lightroom smart previews. These smart previews are stored as DNG files. These DNG files are lower resolution and are smaller (both in file size and in pixel dimension size). On a PC, DNG files can be opened by Microsoft Photos, although by default, they will open in Snip & Sketch.

usability – In a Desktop application, should the recent file list placed directly in the file menu

A desktop tool mostly offers recent files. I am used to press Alt+F and then 1 to open the first recent files. It seems that I learned it from Notepad++. I thought it was a “platform convention” (refs Usability Guidelines), but it doesn’t seem like that.

Here are some examples. What would you recommend why? Maybe I am a too old-school user wanting to have the list of recent files with one action (one hotkey), not with a combined action (two subsequent hotkeys).









(I want to change that –>, but I am unsure)

Potential problems with global scope via isolated file bundling in .NET for JavaScript files?

If anyone can suggest a much better worded question, but what I am trying to ask here is, I turned in a well designed JavaScript frontend, but the .NET developer could not get it to bundle using the Mads Kristensen bundler tool.

The bundler complained about the import statements. There was nothing wrong with the import statements they were used correctly and made for a working frontend. The error kept referring to an unexpected end of input citing the semicolons of the import statements.

So the individual decided to remove all import statements and bundle all the files in isolation, which I believe runs into the issue as answered by Martijn:

why are globals bad in javascript

If I am correct about the above applying to this case, could someone provide a concrete example as to what are some potentials or cite a use case where doing things this way went really bad? Saying that everything has access to everything and is contrary to encapsulation goes over the head of non-technical audience.

How to stream a file to dropbox?

I finally convinced someone willing to share his full archival node 5868GiB database for free (which now requires to be built in ram and thus requires 100000$ worth of ram in order in order to be built but can be run on an ssd once done).

However he want to send it only through sending a tar over raw tcp using a rather slow (100Mps) connection for this task.
I m needing to get it on dropbox and as a result, he don’t want to use the upload key here) allowing to upload files through a web browser without a dropbox account (it really annoyed him that I talked about using an other method or compressing the database to the point he is on the verge of changing his mind about sharing it).
Because on my side dropbox allows using 10Tib of storage for free during 30 days and I didn’t received the required ssd yet (so once received I will be able to download it using a faster speed).

So the idea right now is to receive it through the method he want and pipe it using command line to the command for uploading it.

There are many tools for sending a file to dropbox. But all those I found requires downloading the whole file first or bufferring it in ram (even for fuse filesystems).

Is there even a curl command for uploading the file to my account or using the original upload key here) link?

“file is locked” when visual studio executes unit test

I developed near 300 unit tests, but sometimes, when trying to develop new tests, or just execute old tests, I got below error (for some of assemblies):

Could not copy "X.dll" to "binDebugX.dll". 
Exceeded retry count of 10. Failed. 
The file is locked by: "Microsoft Visual Studio 2019 (37736)"

After that only restarting visual studio resolves problem. Normally this error will be thrown when I changed tests or library and try to execute test again.

Any idea how can I resolve this error?

Azure Windows VM cannot access file share of itself by public IP address

I made a virtual machine on Azure Virtual Machines with Windows Server 2019.

I tried to access SMB file share of the server from the same machine. But it failed.

access from: (The same machine)
access to: (public IP address)

net use /user:test

The specified network password is not correct.

I tried to access it from another PC and it succeeded. The same NSG was used between the two cases. It was not caused by the NSG or firewall settings on Windows.

access from: (non-Azure PC)
access to: (public IP address)

net use /user:test

Azure VMs only know their private address. I added the public address to the NIC. After that I was able to access the file share.

Does anybody know why I couldn’t access the same machine? I guess IP address is somehow associated with the problem.

theming – file name in twig

I created a content type with a “file” field type. This to upload a pdf file.
Now I want to create a link to open that specific file, in my twig.

If i do this : {{content.field_menukaart}} , it opens my file correctly. But I want another link text other than my filename. For example “open here”.

This is whre I get stuck. How could I do this ?
This is not working : open here

Thank you for your help,