Excel – Automatically Publish graphs to Intranet

150 pts.
Tags:
Microsoft Excel
VB
I want to publish updated graphs to my intranet automaticlly. ie open excel, refresh data (from as400)then save,publish&close (running from the scheduler ) I have my Downloaded vb express & looked at vb sites etc… & managed to create a project which publishes the page to the intranet correctly using f5 but as I say I want this to be automatic. Any ideas ??? Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call ColFunc() End Sub Function ColFunc() As Integer Dim objExcel Dim objWorkBook objExcel = CreateObject(”EXCEL.APPLICATION”) objWorkBook = objExcel.Workbooks.Open(”filename”) objExcel.DisplayAlerts = False objWorkBook.SaveAs(”filename”, 44) objExcel.DisplayAlerts = True objWorkBook.Close(True) objExcel.Quit() objWorkBook = Nothing objExcel = Nothing Return 0 End Function End Class
ASKED: September 15, 2008  2:50 PM
UPDATED: September 20, 2008  9:46 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’d recommend getting rid of the VB program. Record an Excel macro directly within excel to save a copy of the file to where it needs to be saved to be on the website.

Then add a scheduled task to launch excel passing it the path to the excel workbook.

After you create the macro, in the macro editor select ThisWorkbook from the project. In the first dropdown menu select Workbook. This will open the Excel macro which runs when the workbook is opened. Give it the name of the Sub which was created when you recorded the Macro.

From now on when the workbook is opened it will update it self and publish it self to the web server.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gerrib
    [...] Read the rest of this great post here [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following