What is the path of Windows directory [duplicate] - excel

This question already has answers here:
How to get the path of current worksheet in VBA?
(5 answers)
Closed 6 days ago.
I need to access the windows directory in my project.
How can I get the windows path? I mean how can I get the path, which the Windows installed in it?
Thanks
I searched the web a lot, but nothing found.

You can use the "environ" function to retrieve the directory, as I show below:
Dim windowsDir As String
windowsDir = Environ("windir")

Related

I am unable to open the excel file with pandas, [duplicate]

This question already has answers here:
Reading/parsing Excel (xls) files with Python [closed]
(13 answers)
Closed 9 months ago.
it displays the following error
this is the error
well i have already tried with diffrent file but it doesnt work
data1=pd.read_excel('second.xlsx',sheet_name="Sheet1")
have you tried passing engine="openpyxl" argument?
P.S this is where I found the answer https://stackoverflow.com/a/50815107

Rename files in sync from node js [duplicate]

This question already has answers here:
Renaming files using node.js
(5 answers)
Closed 3 years ago.
I have some files that I need to copy in another folder and then renaming all of them one by one. Is there any solution to rename all those files in the new folder one by one in synchronous way?
The function you're looking for is
fs.renameSync(old_file_path, new_file_path)
You can find it in the node documentation here
Remember you'll need to require in filesystem with const fs = require('fs') as well.

How to register a legacy typelib (.tlb) on Windows 10? [duplicate]

This question already has answers here:
What happened to regtlibv12?
(3 answers)
Closed 3 years ago.
I have Visual Studio 2015 running on Windows 10 and need to register a legacy type lib (.tlb). From the posts I've found, regtlibv12.exe is the tool for this. However, I can't find it under C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ or anywhere else for that matter. Does anyone know how to register .tlb if regtlibv12.exe doesn't exist?
I've tried regasm /tlb:path but I get errors saying the path cannot be read.
Any help would be much appreciated.
You need to get the old regtlibv12.exe from an older machine.
I upgraded to Windows 10 and lost the function but found it here:
C:\Windows.old\Windows\Microsoft.NET\Framework\v4.0.30319
works fine.

Avoid ../../../ require in nodejs [duplicate]

This question already has answers here:
How can I make Node.js 'require' absolute? (instead of relative)
(39 answers)
Closed 8 years ago.
I'm creating an express 4 project and many of my files are nested within folders. Unfortunately I using a lot of :
var x = require('../../../../file');
I'm thinking I can avoid this if I have access to the base url of the project, but I'm seeing that using a global variable isn't a good idea. What's the best way to tackle this?
If you want directory of the root script from which the node process started, you can get it like this:
var root = require.main.filename.slice(0,require.main.filename.lastIndexOf('/'))
or, as #ChiChou suggested:
var root = require('path').dirname(require.main.filename)
This assumes that the main script (or any other script that requires your code) is run from the root directory.
You can use this root as your "base url".

adding phpdoc to new files [duplicate]

This question already has answers here:
A tool to add and complete PHP source code documentation [closed]
(9 answers)
Closed 9 years ago.
im looking for a way to add some docblocks to a new .php file, so i can have it add the description, package name, author , etc to a new file.
i have been searching for a couple days and I dont see any results on how to add just to 1 .php file, maybe a console command or another utility?
Some sort of generator
Try PHP_DocBlockGenerator from PEAR -- http://pear.php.net/package/PHP_DocBlockGenerator

Resources