Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Huh? Where the heck are you?

    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

  2. #2
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Quote Originally Posted by Bruce
    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:

    Code:
    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

  3. #3
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    Where do I place this code?

    OOPS! Got it... Thanks so much!
    Last edited by Bruce; 08-23-2004 at 09:34 AM.

  4. #4
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    FYI the excel viewer will not allow you to anything except VIEW ONLY. shoot!.

  5. #5
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    This is why I like Flashpaper.

    Macromedia, Flashpaper 2 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,
    Intrigued

  6. #6
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    Yes but, in excel you can use the formulas but not with the viewer. Can you do that with Flash Paper?

  7. #7
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by Bruce
    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,
    Attached Files
    Last edited by Intrigued; 08-23-2004 at 08:00 PM.
    Intrigued

  8. #8
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    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.

    Corey Milner
    Creative Director, Indigo Rose Software

  9. #9
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by Corey
    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.
    Ah! That's pretty swanky!
    Intrigued

  10. #10
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Indeed. I just installed the trial and tried it out. Very cool tool!

    Corey Milner
    Creative Director, Indigo Rose Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts