ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > User Development
Downloads

User Development User developed add-ons to Flexsim

  #1  
Old 10-08-2010
Gleny Rodriguez's Avatar
Gleny Rodriguez Gleny Rodriguez is offline
Flexsim User
 
Join Date: Jan 2010
Location: Honduras
Posts: 12
Downloads: 2
Uploads: 0
Thanks: 7
Thanked 2 Times in 2 Posts
Rep Power: 126
Gleny Rodriguez is on a distinguished road
Default Create an Excel book instead of open one

Hello All.
I´m facing an issue, I would like to create an Excel book with 5 sheets every sheet will be a Global table data exported from a GUI in FlexSim, this book will contain all the data for analize of the scenario, the idea is to run 5 scenario, and export the data for each scenario. "5" it just for say a number maybe 20 scenarios or more
and I don´t know how to do this.


and the other hand, a little time ago I wrote a Class (DLL) for Excel or Open Office Calc than allow me create and manipulate for exporting data using Excel or Calc, using automation I just need to have Excel or Calc installed.
but I don´t know how to use the DLL in FleXsim.
  #2  
Old 10-08-2010
AJ Bobo's Avatar
AJ Bobo AJ Bobo is offline
Flexsim Senior Developer
 
Join Date: Jul 2007
Posts: 108
Downloads: 8
Uploads: 0
Thanks: 23
Thanked 89 Times in 41 Posts
Rep Power: 221
AJ Bobo is a jewel in the roughAJ Bobo is a jewel in the roughAJ Bobo is a jewel in the roughAJ Bobo is a jewel in the rough
Default

When I do things like this, I have my model open an empty Excel file that has one or two sheets already in it. I generally call this file OutputTemplate.xls, or something similar. The sheets that already exist are ones that I know I will need. I'll put as many row or column headers in as I can when the workbook is created, and then my model populates it with data.

When my model needs to export to Excel I open this "template" file, write data to it, possibly create new tabs (using the excelcreatesheet() command) and then save it with a new name (either with excelsave() or with excelmacro()).

This approach to Excel output has worked very well for me in a number of projects.
The Following 2 Users Say Thank You to AJ Bobo For This Useful Post:
Stefan Trabut (04-20-2011)
  #3  
Old 10-08-2010
Gleny Rodriguez's Avatar
Gleny Rodriguez Gleny Rodriguez is offline
Flexsim User
 
Join Date: Jan 2010
Location: Honduras
Posts: 12
Downloads: 2
Uploads: 0
Thanks: 7
Thanked 2 Times in 2 Posts
Rep Power: 126
Gleny Rodriguez is on a distinguished road
Default

Thanks!, AJ Bobo. I will try this.
I´m trying to figure out how to use my own DLL for exporting data to Excel with FlexSim.
because I want to make something more sophisticate like give format to the rows an columns.

Thanks
  #4  
Old 10-08-2010
AJ Bobo's Avatar
AJ Bobo AJ Bobo is offline
Flexsim Senior Developer
 
Join Date: Jul 2007
Posts: 108
Downloads: 8
Uploads: 0
Thanks: 23
Thanked 89 Times in 41 Posts
Rep Power: 221
AJ Bobo is a jewel in the roughAJ Bobo is a jewel in the roughAJ Bobo is a jewel in the roughAJ Bobo is a jewel in the rough
Default

I've done cell formatting in two ways, both of which use the excelmacro() command:

1) I'll put code to format specific sheets/cells in VBA functions in my OutputTemplate.xls file. Then I call the VBA functions like this:
excelmacro("RUN(\"ThisWorkbook.FormatTabs\",false) ");
2) I'll run the formatting code directly from my model export code like this:
excelmacro("SELECT(\"r2c1\")");
excelmacro("STYLE(FALSE,TRUE)"); // Make text italic
excelmacro("SELECT(\"r1c1\")");
The Following 2 Users Say Thank You to AJ Bobo For This Useful Post:
Phil BoBo (10-11-2010)


Thread Thread Starter Forum Replies Last Post
A Few Misc. Notes while reading through the Book Sean HensleyMSU Flexsim Student Forum 3 08-19-2011 11:41 PM
Excel 2002 vs. Excel 2007 Nico Zahn Q&A 2 04-27-2009 01:47 AM
where to create operator TS ? qin tian Q&A 3 10-22-2008 07:59 PM
question to create my own objects Kang Han Q&A 0 09-25-2008 01:17 AM
Create tables on the fly AlanZhang Tips and Tricks 0 08-24-2007 06:01 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.