Place EXCEL table

Hi. I use this code to test excel table import in Indesign.
The table is imported correctly but without any preferences.
Any help?
REM LOAD FILE FROM FILE
file_indd= "C:\test.indd"
REM from samples
Function myGetBounds(myDocument, myPage)
  idRightHand = &H72677468
  idLeftHand = &H6C667468
  idSingleSided = &H75736578
  myPageWidth = myDocument.documentPreferences.pageWidth
  myPageHeight = myDocument.documentPreferences.pageHeight
  If myPage.Side = idLeftHand Then
    myX2 = myPage.marginPreferences.Left
    myX1 = myPage.marginPreferences.Right
  Else
    myX1 = myPage.marginPreferences.Left
    myX2 = myPage.marginPreferences.Right
  End If
  myX2 = myPageWidth - myX2
  myY1 = myPage.marginPreferences.Top
  myY2 = myPageHeight - myPage.marginPreferences.bottom
  myGetBounds = Array(myY1, myX1, myY2, myX2)
End Function
REM OPEN Indesign
Set myInDesign = CreateObject("InDesign.Application.CS3")
myInDesign.ScriptPreferences.UserInteractionLevel = &H654E7672
myInDesign.ScriptPreferences.EnableRedraw = False              
REM LOA Ddocument
Set myDocument = myInDesign.Open( file_indd , true)
REM Set myDocument = myInDesign.ActiveDocument
Rem Sets the Excel import filter preferences.
With myInDesign.ExcelImportPreferences
    Rem alignmentStyle property can be:
    idSpreadsheet = &H73707273
    idLeftAlign = &H6C656674
    idRightAlign = &H72676874
    idCenterAlign= &H63656E74
    REM
    AlignmentStyle = idSpreadsheet
    DecimalPlaces = 4
    PreserveGraphics = False
    REM Enter the range you want to import as "start cell:end cell".
    RangeName = "A1:B3"
    SheetIndex = 1
    SheetName = ""
    ShowHiddenCells = False
    REM tableFormatting property can be:
    idExcelFormattedTable = &H786C4654
    idExcelUnformattedTable = &H786C5554
    idExcelUnformattedTabbedText = &H78555454
    REM
    TableFormatting = idExcelFormattedTable
    UseTypographersQuotes = True
    ViewName = ""
End With                                          
REM Create a text frame.
Set myTextFrame = myDocument.Pages.Item(1).TextFrames.Add
myTextFrame.geometricBounds = myGetBounds(myDocument, myDocument.Pages.Item(1))
REM PLACE EXCEL FILE
myTextFrame.Place("C:\test.xls")

Can anybody try the scritp on windows machine (vbscript) to see if is a problem only with my Pc?
Thanks

Similar Messages

  • Place the links(Pictures and Excel table) to Indesign

    Dear All,
    We need place some Microsoft Word files into Indesign. and in the word files, contain some link for pictures, Microsoft excel tables. and we need use the C++ to build a InDesign add-in to do the following things( Indesign CS5, Windows 7, VS2008):
    Place the word files into InDesign
    Find and automatically insert the pictures link files into Indesign
    Find and automatically insert the Microsoft Excel table into Indesign.
    My Questions are:
    Does Indesign CS5 SDK provide those APIs?
    Can we build a standalone application to do those jobs?
    if C++ can't do this, what kinds of Development tools can do those jobs.
    Great thanks for any inputs.
    My Best Regards,
    Jerome

    Hi Pudgesan,
    You can paste data from an Excel spreadsheet into an InDesign or document. The Clipboard Handling preference settings determine how text pasted from another application is formatted.
    If Text Only is selected, the information appears as unformatted tabbed text, which you can then convert to a table.
    If All Information is selected, the pasted text appears in a formatted table.
    If you want more control over formatting the imported table, or if you want to maintain spreadsheet formatting, use the Place command to import the table. If you want to maintain a link to the spreadsheet, select the Create Links When Placing Text And Spreadsheet Files option in File Handling preference settings.
    Hope this helps.
    Regards,
    Sumit Singh

  • Search text in Excel table in a Word 2013 document

    Hello,
    someone would be there if there is a file content search tool on Windows (such as Google search or DocFetcher ..)
    that would return a string in an Excel table itself contained in a word document 2013.
    This worked with such DocFetcher with old office version. But since 2013 dox Office Word and Excel xlsx had to change and it no longer works.
    thank you in advance
    greetings.
    JLuc

    Hi Jlcapel,
    Thanks for posting in MSDN forum.
    This forum is for develoers discussing developing issues about
    apps for Office.
    If you want to a tool that supports content searching, I suggest that you search it on the internet.
    >>This worked with such DocFetcher with old office version. But since 2013 dox Office Word and Excel xlsx had to change and it no longer works.<<
    If you have issues about using DocFetcher, I suggest that you contact the verdor of it to get more effective response.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Place Excel file and keep accurate formatting

    In my organization, InDesign is used for creating several rather comprehensive price lists (500 pages and more ...).
    Needless to say, each price list contains a lot of tables. Currently we
    create tables in Excel,
    save it as pdf file and
    place the pdf in InDesign
    Of course, that's cumbersome (no Edit Original command --> each modification in the original table restarts the above mentioned process) - that gives us a hard time dealing with hundreds of tables... 
    It would be ideal to place Excel files directly - but after hours of trial & error I'm still not able to insert a table AND keep the accurate Excel-formatting. There are always some smaller or bigger deviations (unexpected line breaks, overset content, wrong line-styles, colors etc.)
    What I did:
    Enabled "Create Links When Placing Text and Spreadsheet Files" in the File Handling Preferences
    Enabled "Import Options" when placing the Excel file
    Choosed "Formatted Table"
    It seems that some older xls files are more likely to raise problems. Newly-created xlsx files are fine most of the time (saving xls to xlsx doesn't make a difference though).
    What are your experiences on importing excel files? Thanks for any hint!
    Regards,
    Florian

    Thanks, Willi.
    The reason why we currently place our tables as PDF is, that we want to avoid any additional setup in InDesign. In fact we use InDesign "merely" to place & arrange all objects like tables, images, text etc. properly. There is no editing or formatting of content done in InDesign (Excel-spreadsheets are well-designed anyway) - I think otherwise our loads of price lists for different countries wouldn't be manageable at the moment ...
    I'm just looking for a way to keep the advantage of placing PDFs (retain accurate form) and eliminate the disadvantages (additional step of saving each spreadsheet as PDF and lack of the "Edit Original" option).
    Any ideas are appreciated!
    Florian

  • Resize excel table that is embedded in Powerpoint via VBScript

    Hi,
    I encounter the following problem:
    I have a powerpoint that has some excel tables in some slides.
    When I activate an Excel table in Powerpoint 2007 and 2010, the size of the excel object is roughly the same as the size of the image that corresponds to that table. When I activate the table in Powerpoint 2013 the size of the object is much shorter than
    the image.
    So, when I deactivate the table the image that is generated is much smaller. Even if I keep the original size and set it again after the deactivation the image becomes "stretched".
    I would like to create a VBSCript that will:
    1) activate excel tables
    2) give them the size of the image element that corresponds to them
    3) Deactivate them so that the image is redrawn
    The part of the VBScript that does the activation/deactivation is the following:
    For Each slide in presentation.Slides
       For Each shape In slide.Shapes
          if shape.Type = 7 Then
             if shape.OLEFormat.ProgID = "Excel.Sheet.12" Then
                 slide.select
                 shape.OLEFormat.Activate
                 ' Here I would like to change the size of the excel object (not of the corresponding image)
                 presentation.ActiveWindow.Selection.Unselect
        End If
    End If
    As I mentioned earlier, if I change the size of the shape after the deactivation the image gets stretched, so somehow I should change the size of the object after the activation.
    Is this possible or is there anything else I could do?

    Hi Stkarp,
    Thanks for posting in MSDN forum.
    Based on the description, you want to resize the Excel table in PowerPoint. After some time researching, I am not able to find a way to ahcieve the goal.
    I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.
    Sorry for any inconvenience and have a nice day!
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to attach image, screen shot or excel table to master vendor copy.

    Hi,
    Please let me know how to attach an image or excel table into "header text" table. This has to be printed and sent to the customer. We use SAP GUI to create purchase orders.
    Thanks in advance.
    Kushal

    Past the code into the post and then click on the post preview tab to check to see if the image rendered...it should show, if not, then either the code wasn't copied properly or the wrong embedding code was used.
    That will provide a link to the image in separate browser window or tab. But if you place a "!" (an exclamation mark) at either end of the link (with no spaces or quotation marks), the image will then be displayed inline, within your post.

  • Excel tables... columns and row formatting after I update the indesign page

    When my excel table gets updated in indesign I lose formatting (hight/wide) for the columns&rows. There are 26 columns and each one is a difference size. Do I have to formatting (hight&wide) each column and row every time the excel table is updated?

    We have many publications with statistical tables, which are done in excel. We want to try to do some publications with only tables and do it in-house. The problem is when we place the table in indesign and finish formatting the table. We will get a updated table that needs to be updated in indesign. But when we do we update we lose all of the indesign formatting. Fixing the fonts, type size, etc is easy but how do we get back the all column widths.

  • PLACED EXCEL TABLE DROPPING DECIMALS

    I am using ID CS4 with XP Pro.  I use Excel to create the parts/application tables I use in my projects.  For the past several days I have been creating and placing these tables with no issues.  Today I placed a table and the decimals of the weights are not being shown.  I went back to a previous page with a parts chart and the decimals were there.  I went back to the page I was working on and tried again to place the table but the decimals do not show.  I went back to a previous parts chart page and the decimals are gone from that chart now.  I do not believe I have changed any settings to cause this and all my excel tables are formatted to show 1 decimal place.  Is this gremlins or unintentionally self-inflicted some how?  Any help would be greatly appreciated.

    Took me a while but I fixed it.  Somehow the 'number of decimal places to include' was set to zero in the excel import options.  Do not ever remember changing that but it's working now.  thanks.

  • Pasting Excel table on illustrator

    Hi everyone,
    I'm trying to copy an excel table into illustrator, however I want it to be a vector graphic, and when I try
    to increase it's size it becomes really ugly and the lines get all messed up.
    I noticed though that if I could convert it to a PDF from illustrator and place it in again as that, it would
    become a vector graphic, and I would not have any of these problems.
    Anyone faced this issue before, any ideas?
    Ted.

    I never tried pasting from Excel, I always open a PDF. By “clean up” I meant that a lot of extra crap comes in, like white or unfilled and unstroked objects. Also any object with both a fill and a stroke comes in as two objects. You no doubt noticed this already.
    If the graphs are relatively simple you might prefer to rebuild them with Illustrator’s rather weak and not-upgraded-in-over-a-decade Graph tools. If you have a lot of graphs all similarly formatted then generating one in Illustrator, tweaking the appearance, and duplicating and editing to make the rest might be easier than fixing each damned Excel graph.
    As for font problems, I don’t know about that, I’m on a Mac and haven’t had that problem when working with the Macintosh version of Excel. If you are using Excel on one computer and Illustrator of another then the fonts on each system may not be the same. That’s all I got for that one.

  • How to find a string inside Excel table

    Hi,
    I am trying to find a string inside Excel table, and it does not work. Please see attached figure. I use the find Invoke Node and do not get anthing.
    Please help
    Attachments:
    find_excel.JPG ‏21 KB

    See attached files.
    Thanks,
    David
    Attachments:
    Excel_table.xls ‏15 KB
    Read_XL.vi ‏42 KB

  • Excel Table with Data Connection Manual Text Entry Misaligned After Refresh

    Greetings!
    I have an Excel 2010 workbook that includes a table linked to my SharePoint 2013 site by a data connection. The SharePoint list feeds the table standard information that's managed on the SharePoint site, but I need the user of the Excel workbook to be able
    to enter text manually in the workbook to associate local information with the line-items coming from the SharePoint list. To do this, I've added extra columns to the end of the table.
    The user can enter information in the appropriate cells in the "extra" columns at the end of the table, but when I refresh the data connection, the addition of a new list item on the SharePoint side results in the user's manually entered text getting
    out of alignment with the row it's supposed to be associated with.
    Example
    Column 1(SP)
    Column 2(Extra)
    Row 1
    Item 1
    Row 2
    Item 2
    Text entered for Item 2
    Row 3
    Item 3
    Then, if I add a new item to the list in SharePoint, for example, something that would appear between the original items 1 & 2, after refreshing the table, I get the following:
    Column 1(SP)
    Column 2(Extra)
    Row 1
    Item 1
    Row 2
    New Item 1.5
    Text entered for Item 2
    Row 3
    Item 2
    Row 4
    Item 3
    The table's data connection is set to insert rows for new items, and I could swear I had this working properly once upon a time...but I can't seem to make it work now.
    Any thoughts on what would cause this?
    Thanks in advance!

    Yes, it is. I realized after posting the first time, that I'd assigned the question to the Visio forum. I wasn't sure how to reassign to the correct (Excel) forum, so I re-posted over there:
    http://social.msdn.microsoft.com/Forums/en-US/b3bbe00c-94c0-48d4-bed9-fbd08d707b1d/excel-table-with-sharepoint-data-connection-manual-text-entry-misaligned-after-refresh?forum=exceldev

  • How can I use PowerPivot tables like Excel tables -- printing, etc.?

    I can't seem to find any information on this anywhere, and even more surprisingly, no one else seems to have even asked this question...
    How can I use tables I create in the Excel PowerPivot window in the same ways I use tables that are in ordinary Excel worksheets, to accomplish tasks such as printing? I am able to use the powerful capabilities of PowerPivot to produce tables with precisely
    the information I need for reports -- connecting data from multiple tables/sources, filtering, etc. -- but then there doesn't seem to be any way to actually print what I'm seeing, nor can I seem to access cells in these PowerPivot tables from Excel worksheets.
    If a PowerPivot table is conceptually an Excel table with additional power in terms of pulling in data and relating it, it would seem appropriate that all the power of Excel could be brought to bear on these PowerPivot tables, but on the contrary, the available
    operations are limited. if, instead, a PowerPivot table is more correctly viewed as a data source that Excel worksheets can connect to, that would be fine, and indeed, one
    can use a PowerPivot table as a data source -- except it can't be brought into an Excel worksheet as an ordinary Excel table, unlike most other data sources.
    I hope I'm missing something really obvious, and that someone can point out what it is. Thanks.

    Kirchh,
    When PowerPivot was first designed, the decision was to integrate closely to Sharepoint to allow for team sharing. We are constantly evaluating customer feedback to add more features, and this has been one of the feedbacks we have received. We will consider
    supporting this in the future but with no gurantee.
    Chu
    -- This posting is provided "AS IS" with no warranties, and confers no rights
    I'm not questioning why PowerPivot is closely integrated with SharePoint. I'm asking why connecting to the PowerPivot model from within Excel was intentionally blocked by Microsoft, when all the functionality to do so appears to be present.
    Is creating an OLE DB connection in Excel to PowerPivot as $Embedded$ supported?
    No support. It was originally designed for SharePoint. This changed with Power Pivot for Excel 2013 (it's packaged with it). Originally the scope (in 2010 through 2012) was that it was for SharePoint users. So it became more obvious through that to market it
    toward all Excel users. Thus the recent changes. 
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • How to place a table of contents at the end of a document?

    I know how to design a table of contents at the beginning of a Pages document.
    I'd like to place a table of contents at the end of a long Pages book.
    Is there any simple trick to place a table of contents at the end of a Pages document?
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

    fruhulda wrote:
    The Table of Contents (TOC) has to be in front of the Chapters it create a TOC from. There is a work around this, but do it first after you have finished the document because you'll loose the automatic update of the TOC.
    Thank you for your attempt to help.
    With TextEdit I loose the formatting of the TOC.
    I found another workaround, I made a printing of the TOC and saved it
    as PDF and included it within an empty page. But this method isn't
    really a simple workaround.
    The conclusion is that there isn't any easy way to place a TOC
    where you want.
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

  • Word 2010 with Embedded Excel table becomes oversized for RDP users

    I originally asked this question on the SharePoint Online forums as this was the first time we've seen this issue. Original Post
    Summarized: we have a Word template with embedded Excel table created in SharePoint Online, and when a RDP user opens it, the document correctly opens in the local version of Word 2010 (not Word Online).   When the table is edited, it becomes
    larger to the point you can no longer view the entire table. 
    We have done some testing with Word 2010 outside of RDP and everything works correctly, the embedded Excel table doesn't become oversized and works as expected.  It seems to definitely be an issue with RDP and I've been looking for any assistance
    on resolving this issue.  I recently did some further testing and found that the only time the table becomes oversized and not view-able is when you copy and paste information from an existing 2003 Excel document.  I would think this is the issue,
    but it doesn't happen when working with Word and SharePoint outside of an RDP environment. 
    The template is a .docx file. All RDP users are in a 2008 R2 environment.

    I did some testing over the weekend and the simple answer to your question - Not always.
    I found 2 variables which seem to cause this to happen:
    1) We have 2 TS servers - one with IE 9, which remains to maintain support for a legacy app which will not work with IE 10 or 11, and one with IE 10.
    2) Screen resolution of the client computer - it seemed that systems with video configurations which could not exceed the maximum of 1280x1024 (the same screen resolution as our TS servers) didn't experience the issue.  There were some laptops
    and higher end systems with widescreen monitors, where this was an issue.  They typically didn't have a 1280x1024 option; yet even if they did they would experience the same issue, just not as pronounced.
    It also seems to only occur when a user copies and pastes information from Excel 2010 into the embedded Excel table in Word 2010.  Again, only within RDP.  On those client computers which had the problem, I could perform the same function outside
    of RDP without any problems.  However, this is not an ideal format for the chefs as they will frequently be moving between different systems during the day.

  • Export Excel Table in .txt File with space delimited text in UNICODE Format

    Hi all
    I've a big unsolved problem: I would like to convert an Excel table with some laboratory data in it (descriptions as text, numbers, variables with some GREEK LETTERS, ...). The output should be a formatted text with a clear structure. A very good solution is
    given by the converter in Excel "Save As" .prn File. All works fine, the formattation is perfect (it does not matter if some parts are cutted because are too long), but unfortunately the greek letters are converted into "?"!!!
    I've tried to convert my .xlsx File in .txt File with formatting Unicode and the greek letters are still there! But in this case the format is not good, the structure of a table is gone!
    Do you know how to save an Excel file in .prn but with Unicode formatting instead of ANSI or a .txt with space delimited text?
    Thanks a lot to everyone that can help me!
    M.L.C.

    This solution works in Excel/Access 2013.
    Link the Excel table into Access.
    In Access, right-click the linked table in the Navigation Pane, point your mouse cursor to "Export", and then choose "Text File" in the sub-menu.
    Name the file, and then under "Specify export options", check "Export data with formatting and layout".  Click "OK".
    Choose either Unicode or Unicode (UTF-8) encoding.  Click "OK".
    Click "Close" to complete the export operation.

Maybe you are looking for