Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Import-PWDocumentsBySpreadsheet error
    • Sign In

    • State Not Answered
    • Replies 2 replies
    • Subscribers 65 subscribers
    • Views 767 views
    • Users 0 members are here

    Import-PWDocumentsBySpreadsheet error

    Philip Las Gourgues
    Offline Philip Las Gourgues over 3 years ago

    Hi all,

    pwps_dab version 1.18.2.0

    ProjectWise version 10.00.03.140

    I'm attempting to use Import-PWDocumentsBySpreadsheet to create some new documents on a datasource and populate their attributes.  I've started by creating the spreadsheet using Export-PWDocuments with the -ExportMetadata switch then modified the created file as required.

    Unfortunately I keep getting the below error even if I just run a straight export/import of the spreadsheet without modifying. Has anyone come across this error before and any ideas on how to resolve it?

    WARNING: Length cannot be less than zero.
    Parameter name: length
    WARNING: at System.String.Substring(Int32 startIndex, Int32 length)
    at PWPS_DAB.ImportExport.UpdatePWDatesAndUsers(Int32 iProjectId, Int32 iDocumentId, Int32 iCreatorId, Int32 iUpdaterId, Int32 iFileUpdaterId, String sCreateDate, String sUpdateDate, String
    sFileUpdateDate, PSCmdlet cmdlet)
    at PWPS_DAB.ImportExport.ImportFromSpreadsheet(String sInputSpreadsheet, String sTargetFolderPath, Int32 iProjectId, Int32 iStorageId, Int32 iEnvironmentId, Int32 iWorkflowId, Boolean bCrea
    teNewVersionIfExists, Boolean bJustUpdateAttributes, Boolean bSkipAuditTrail, Boolean bWriteBackLinks, Boolean bDeleteFilesOnImport, Boolean bCreateMissingFiles, PSCmdlet cmdlet)

    Regards,

    Philip Las Gourgues

    • Sign in to reply
    • Cancel
    • Brian Flaherty
      0 Offline Brian Flaherty Fri, Feb 28 2020 2:08 PM

      Can you provide the version of ProjectWise, PowerShell, and PWPS_DAB module.  Also, can you send a copy of your spreadsheet to me  at brian.flaherty@bentley.com.  

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Philip Las Gourgues
      0 Offline Philip Las Gourgues Sun, Mar 1 2020 10:42 PM in reply to Brian Flaherty

      Hi Brian,

      Thank you very much for the reply. Dan Williams and Zachery Kerr have also contacted me directly. ProjectWise and PWPS_DAB versions are shown above, PowerShell is version 5.1.16299.1146. I've also forwarded you an email with the environment and spreadsheet attached.

      Cheers,

      Phil

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies