Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently September 28th, 2024, 9:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Opus vs Excel
PostPosted: May 30th, 2007, 2:48 am 
Offline

Joined: November 3rd, 2004, 12:58 pm
Posts: 230
Location: Australia
Hello, I am working on a project where my client wants an application built in Opus that is capable to read some cells in an excel file and report it inside Opus.

For me, the easiest way will be to link the spreadsheet to a database and then collect the info from the database but my clients does not want that so...has anybody here has been able to read the content of a "spreadsheet cell" and record it into a variable that then can be called from inside Opus?

Ah! clients, clients! Always wanting not the easy but the complicated!
German

_________________
German Silva
Senior Web & Multimedia Developer
E-solutions Inc
Pro version 8.10 user


For this message Koala has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: May 30th, 2007, 3:24 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Seems like there was some prior work done on that.
viewtopic.php?t=912&highlight=excel+read

I am curious too... to learn that in the future. And how flexible any solution here can be. Good luck.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: May 30th, 2007, 8:58 am 
Offline

Joined: October 25th, 2004, 4:03 pm
Posts: 249
Location: Digital Workshop
Opus: v7.04
OS: XP, Vista Home Premium, Win7 Professional 64bit
System: Dell Inspiron 560 Quad Core 2.5Ghz 4Gb RAM, 1Tb HD, HP laptop and various others
If I understand your requirement there is an example which does exactly what you want provided in the sample publications which ship with Opus. Use the Browse Sample Publications on the File menu to find the Database examples - one uses Excel.

The only issue comes when trying to write a value back to a cell as that is not possible with Excel - then you would have to use a database.

Paul Harris

_________________
Managing Director
Digital Workshop


For this message Paul Harris has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 30th, 2007, 9:03 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Excel workbooks can be linked to Opus via a standard ODBC link, the same as Access MDB file. (see attached)

I seem to remember that in a previous incarnation of Excel, that you had to specify the field headers - but either that has been removed from my latest version (2003) or Opus doesn't require this.

I've uploaded the published version because changing the settings after establishing a new ODBC is a pain and basically, its easy to build this sample from scratch.

Mack


You do not have the required permissions to view the files attached to this post.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: thanks
PostPosted: May 30th, 2007, 9:58 am 
Offline

Joined: November 3rd, 2004, 12:58 pm
Posts: 230
Location: Australia
Thanks mackabi, I'll give it a go and report back
Cheers mate!

German

_________________
German Silva
Senior Web & Multimedia Developer
E-solutions Inc
Pro version 8.10 user


For this message Koala has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Opus vs Excel
PostPosted: December 7th, 2011, 7:47 pm 
Offline
User avatar

Joined: November 4th, 2004, 5:04 pm
Posts: 310
Location: New Zealand
Opus: Evolution 8.5
OS: Windows 7 Professional
System: AMD Phenom(tm) II X6 1055T Processor 2.80GHz
I am just about to start a project that draws data from an excel database.
I have the sample pub and will have a look at that.
My initial question is,
Rather than just using next or previous records.
How would I set up a search function to go to specific records?

Regards

Pete

_________________
Opus Evolution Pro user
Windows 7 Professional
http://www.petesmithiesmedia.com


For this message Pete Smithies has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Opus vs Excel
PostPosted: December 15th, 2011, 9:50 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 511
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I have created some reasonably advanced database applications using excel where I read and write to the database, do searches, listboxes, hyperlinks in the database which opens documents within Opus.
When you create a ODBC link in Opus to the excel spreadsheet, it automatically pulls in the field headers when you do the first query.

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Opus vs Excel
PostPosted: December 15th, 2011, 10:12 pm 
Offline
User avatar

Joined: November 4th, 2004, 5:04 pm
Posts: 310
Location: New Zealand
Opus: Evolution 8.5
OS: Windows 7 Professional
System: AMD Phenom(tm) II X6 1055T Processor 2.80GHz
For some reason, I have not been able to get the Excel ODBC to work - I am using Access ok - but, it would be good to get excel working for any future projects. What do/would you select for Excel created in Office 2007 for instannce?

Regards

Pete

_________________
Opus Evolution Pro user
Windows 7 Professional
http://www.petesmithiesmedia.com


For this message Pete Smithies has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Opus vs Excel
PostPosted: December 16th, 2011, 1:17 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 511
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I created a spreadsheet, three column headers in the first row, name, address, age.
I saved the spreadsheet as Test.xls
In Opus I created a input box and attached a Database query. In the Database query tab, click on 'select',
then in file data source, select 'new'
select the Microsoft Excel DSN driver(*.xls)
Give the DSN a name 'test'
then hit 'finish'
In the ODBC Microsoft Excel Setup window, select database version Excel97-2000, then select the spreadsheet (test.xls)

the database query should now have FILEDSN=test.dsn; in the DSN field.
Select SQL Wizzard
don't select data for updating. select 'next'
select the pulldown in the table box
select Sheet1$
the column headers should appear, then you set up the rest of the query


I use a mixture of database actions and scripting.




Code:
here is a chunk of code to connect to another database and do a query on an excel database.

SpecSearch=("%"+SpecSearch+"%")
PartSearch=("%"+PartSearch+"%")
var myDB = new Database("FILEDSN=EditCert.dsn;")

if (myDB.Connect())
{
ConnectedTo.Show()
}
else
{
Debug.trace("not connected")
NotConnected.Show()

}
var records = myDB.ExecuteSQL("SELECT * FROM [ECLIPSE_EMC$]WHERE Part_Tested_1 LIKE '%"+PartSearch+"%' OR Part_Tested_12 LIKE '%"+PartSearch+"%';");

NumRecords=records.GetNumberOfRecords()
CurRecord=records.GetCurrentRecordNumber()
LoopCount=NumRecords
NumRecords=0
records.FirstRecord()
...............more code


Sorry for the scrappy reply, I lost the first one!

Sandy

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi, Pete Smithies


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group