Jump to content

Recommended Posts

Posted

Hi,

 

I am currently trying to find a way of exporting a total House point number from SIMS as a txt file. This is because I have created a Intranet site and I have made separate box's for each house. which display the content of the .txt file its pointing to.

 

I have managed to export House points as a excel file with a pivot table which then gives a grand total. So is there a way of exporting that cell which is C17 as a .txt file to a certain location?

 

Or is there a better way of doing it?

 

Thanks

Posted

Hi,

 

The .txt file is just a blank .txt file just with a number in as the webpage would display any content which is in the file.

 

Thanks

Posted (edited)

Here you go, some simple VBA to write cell value to a .txt file

Just change the myFile path and cellValue range

 

Sub eduGeek()
   Dim myFile As String, cellValue As Variant
   
   myFile = "C:\temp\edugeek.txt"
   cellValue = Range("A1").Value
   
   Open myFile For Output As #1
   Print #1, cellValue
   Close #1
End Sub

Edited by garbage46
Posted (edited)

Add this to a batch file and set up a scheduled task.

 

"C:\program Files (x86)\SIMS\SIMS .net\commandreporter.exe" /user:[color="#0000FF"]edugeek[/color] /password:[color="#0000FF"]12345678[/color] /report:"[color="#0000FF"]housepoints export to text[/color]" /output:"[color="#0000FF"]f:\datasync\housepoints.txt[/color]"

 

Change the parts in blue:- username, password, report, text file output path

 

Remember to include folder path in the "Start In Optional" path. I have encountered issues when leaving this part blank

 

Untitled.png

Edited by garbage46
  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...