Use batchjob to open Excel File

rohrl77

I'm trying to open an Excel File using a batchjob, but Windows isn't having it. I'm new at batchjobs so I'm largely cluess and have been trying to figure it out using oneline tips. However, I don't see what I'm doing differently than some of the examples that I've found.

Can anyone point out why this doesn't work to me?

@echo off
cls
start /d C:\Users\Admin\Gotti_Notes%20vENO0.3.xlsm

Also, since I'm asking, how can I set the exact time for this to run? Scheduled tasks in windows I assume. Correct?

I get no error message... it seems to run, but simply doesn't do anything.

The point of all of this is to open the file at a specified time (at night) and have excel automatically run a vba macro i wrote (which it would do using the "open" command).

UPDATE & SOLUTION:

@echo off
cls
call C:\Users\Admin\Notes.xlsm
echo on

I had to change the name in order for it to work.

APerson

I'm pretty sure you should be doing something like

C:\path\to\excel C:\Users\Admin\Gotti_Notes%20vENO0.3.xlsm

instead. As this SuperUser question notes, the command might look more like:

"C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE" "C:\Users\Admin\Gotti_Notes%20vENO0.3.xlsm"

Side note: according to this forum post, if running a macro is your eventual goal, you can pass in the name of the macro with the /m flag. The poster says that this works with Word, but it might also work with Excel too.

Another side note: since you start the file with @echo off, you probably want to reverse this at the end with echo on; otherwise, after you run the script you won't have much of a prompt anymore.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How to open a file using Excel VBA and turn off updating links

分類Dev

Open silent excel file from list to change value to specific cell

分類Dev

How to open an excel file with write protection using C#

分類Dev

How to open "PPT file with new" option in Excel VBA

分類Dev

Using Open Xml to create xlsx file for Excel 2013

分類Dev

excel 2011 mac VBA open file - error 75

分類Dev

Can't open an specific Excel file - App crash

分類Dev

How to use Server.MapPath for Excel File

分類Dev

How does the xdg-open command know which application to use to open a file?

分類Dev

Export html to Excel : when try to open file it gives prompt like file is corrupted

分類Dev

use Eloquent relationships while exporting data to Excel file in Laravel

分類Dev

Can I use an excel file twice in one Talend job?

分類Dev

Is there a way to make Microsoft Excel 2010 include the *.csv files in its list of default files in the file open dialogue box

分類Dev

To open a bak file

分類Dev

What is an open file description?

分類Dev

Exit program and open file

分類Dev

How to open ods files in Excel?

分類Dev

Write to excel using Apache POI. FileNotFoundException:(The requested operation cannot be performed on a file with a user-mapped section open)

分類Dev

how to use stopword sastrawi library python if data from file excel or csv

分類Dev

How to Copy and paste my data in the selected file when I use EXCEL VBA

分類Dev

How can I use variables in a picture's file name and loops to open multiple pictures using pygame without cluttering the code

分類Dev

What command to use to open sublime?

分類Dev

What command to use to open sublime?

分類Dev

Javascript - Window open, use CDN

分類Dev

Return file handles opened with with open?

分類Dev

syscall OSX create file [open]

分類Dev

How to open file in C program?

分類Dev

Open the next html file in the directory

分類Dev

QtCreator GUI open text file

Related 関連記事

  1. 1

    How to open a file using Excel VBA and turn off updating links

  2. 2

    Open silent excel file from list to change value to specific cell

  3. 3

    How to open an excel file with write protection using C#

  4. 4

    How to open "PPT file with new" option in Excel VBA

  5. 5

    Using Open Xml to create xlsx file for Excel 2013

  6. 6

    excel 2011 mac VBA open file - error 75

  7. 7

    Can't open an specific Excel file - App crash

  8. 8

    How to use Server.MapPath for Excel File

  9. 9

    How does the xdg-open command know which application to use to open a file?

  10. 10

    Export html to Excel : when try to open file it gives prompt like file is corrupted

  11. 11

    use Eloquent relationships while exporting data to Excel file in Laravel

  12. 12

    Can I use an excel file twice in one Talend job?

  13. 13

    Is there a way to make Microsoft Excel 2010 include the *.csv files in its list of default files in the file open dialogue box

  14. 14

    To open a bak file

  15. 15

    What is an open file description?

  16. 16

    Exit program and open file

  17. 17

    How to open ods files in Excel?

  18. 18

    Write to excel using Apache POI. FileNotFoundException:(The requested operation cannot be performed on a file with a user-mapped section open)

  19. 19

    how to use stopword sastrawi library python if data from file excel or csv

  20. 20

    How to Copy and paste my data in the selected file when I use EXCEL VBA

  21. 21

    How can I use variables in a picture's file name and loops to open multiple pictures using pygame without cluttering the code

  22. 22

    What command to use to open sublime?

  23. 23

    What command to use to open sublime?

  24. 24

    Javascript - Window open, use CDN

  25. 25

    Return file handles opened with with open?

  26. 26

    syscall OSX create file [open]

  27. 27

    How to open file in C program?

  28. 28

    Open the next html file in the directory

  29. 29

    QtCreator GUI open text file

ホットタグ

アーカイブ