PDA

View Full Version : Where the heck are you?


Bruce
08-22-2004, 11:13 PM
Hello everyone...

I am accessing a popup and using a viewer to take a gander at some excel sheets. The problem is, the .xls file names look like this "Family Monthly Budget.xls" but the viewer says it can't find "Family.xls". Why is it chopping the name up? Could I be doing something wrong? (HAR HAR HAR)

This is my code:

--define the tables that will be used
tblMenuItem={}
tblPopup = {};

--define a counter variable
ctr = 0;

--Get all the files on in the folder, store them in a table
tblFiles = File.Find("AutoPlay\\Docs\\excelshow\\", "*.xls", false, false, nil)

--if there are no files, skip the popup
if tblFiles ~= nil then
--loop through the files found on the desktop
for n, sFiles in tblFiles do
--split the path into a table
tblPath=String.SplitPath(sFiles);

--increment counter
ctr = ctr + 1;

--define the row in the table with place holder text
tblMenuItem[ctr]={text=tblPath.Filename,type=[[0]],checked=[[false]],enabled=[[t
rue]]}

--insert into the PopUp
Table.Insert(tblPopup, Table.Count(tblPopup) + 1, tblMenuItem[ctr])
end

--get the labels position and size
tblPos = Label.GetPos("Extras Label");
tblSize = Label.GetSize("Extras Label");

x = tblPos.X;
y = tblPos.Y + tblSize.Height;

--show the popup
result = PopupMenu.Show(tblPopup, x, y, PopupMenu.HALIGN_LEFT, PopupMenu.VALIGN_TOP);
if result ~= "CANCELLED" then
File.Run("AutoPlay\\Docs\\excel\\XLVIEW.EXE", "AutoPlay\\Docs\\excelshow\\".. result ..".xls", "", SW_SHOWNORMAL, false);
end
end

csd214
08-23-2004, 04:01 AM
Could I be doing something wrong?
No (not in this case).

xlView seems to be a bit 8.3 fashioned. Big-Brother Excel has no problem with
File.Open("AutoPlay\\Docs\\excelshow\\".. result ..".xls", "", SW_SHOWNORMAL);

xlView tries to open “Family.xls”, “Monthly.xls” and “Budget.xls”. If there is no command line options, this workaround with underscores should help:

if result ~= "CANCELLED" then
NameOrig = result;
NameUscore = String.Replace(NameOrig, " ", "_", false);
bRenamed = false;
if NameOrig ~= NameUscore then
File.Rename("AutoPlay\\Docs\\excelshow\\"..NameOrig..".xls", "AutoPlay\\Docs\\excelshow\\"..NameUscore..".xls");
bRenamed = true;
end
FileExist = File.DoesExist("AutoPlay\\Docs\\excelshow\\"..NameUscore..".xls");
if FileExist then
File.Run("AutoPlay\\Docs\\excel\\XLVIEW.EXE", "AutoPlay\\Docs\\excelshow\\".. NameUscore ..".xls", "", SW_SHOWNORMAL, true);
-- WaitForReturn = true
end
if bRenamed then
File.Rename("AutoPlay\\Docs\\excelshow\\"..NameUscore..".xls", "AutoPlay\\Docs\\excelshow\\"..NameOrig..".xls");
end
end

Bruce
08-23-2004, 10:31 AM
Where do I place this code?

OOPS! Got it... Thanks so much!

Bruce
08-23-2004, 06:29 PM
FYI the excel viewer will not allow you to anything except VIEW ONLY. shoot!. :wow

Intrigued
08-23-2004, 06:54 PM
This is why I like Flashpaper.

Macromedia, Flashpaper 2 (http://www.indigorose.com/forums/showthread.php?t=8305) is out. Users can even search the document, highlight and copy the data to the clipboard. Which then opens the door to using the Clipboard plugin!

Sincerely,

Bruce
08-23-2004, 07:57 PM
Yes but, in excel you can use the formulas but not with the viewer. Can you do that with Flash Paper?

Intrigued
08-23-2004, 08:54 PM
Yes but, in excel you can use the formulas but not with the viewer. Can you do that with Flash Paper?

Is this what you wanted to know?

See the attachment. It was created in Excel 2003 and then converted to Flashpaper 2.

Or did I miss your point?

Sincerely,

Corey
08-23-2004, 09:17 PM
Check this out:

http://www.xleverywhere.com/excel.htm

You can create interactive Excel as web pages which can be served in a web browser object. There are a few similar titles around too but that one looks pretty neat at first glance... Click on the "Play Demo" button. :) :yes

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Intrigued
08-23-2004, 09:38 PM
Check this out:

http://www.xleverywhere.com/excel.htm

You can create interactive Excel as web pages which can be served in a web browser object. There are a few similar titles around too but that one looks pretty neat at first glance... Click on the "Play Demo" button. :) :yes
Ah! That's pretty swanky!

Corey
08-23-2004, 10:32 PM
Indeed. I just installed the trial and tried it out. Very cool tool! :yes

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)