Export from Excel to Access using ASP in DWMX

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Export from Excel to Access using ASP in DWMX

    Hi
    Anyone know an ASP script for transferring data from an Excel sheet to an
    Access table, some of the fields of which contain names which have an
    apostrophe (') in them.
    I have tried all sorts of things but am getting tripped up by the apostrophe
    which is used as a field container in the SQL :

    "INSERT INTO tblResults Values(0,'" & rsExcel("FeisID") & "' , '" &
    rsExcel("CompNo") & "' , '" & rsExcel("Entry") & "' , '" & rsExcel("Name") &
    "' , '" & rsExcel("School") & "' , '" & rsExcel("Position") & "' , '0' , '"
    & Done & "')"

    The first field is the ID field of tblResults and need to be incremented
    automatically. If I leave the first value out, I get an error along the
    lines of "Number of query values and destination fields are not the same"
    Also, if the name field is like Harry O'Hare, the thing fails...
    Any ideas anyone? Many thanks

    Jim



    antler44 Guest

  2. Similar Questions and Discussions

    1. Export to excel
      Hi, I have an aspx page with an export to excel functionality....it opens a dialog box asking the client to save/open the xls file.However this...
    2. Name Redefined? What is this Dim? (DWMX/ASP/VBscript/Access)
      Hi, I've been having this problem with a few sites now. It appears that in some cases, and I can't spot a trend, but when I add a recordset to a...
    3. Excel into Access using ASP with DWMX
      Hi Anyone know an ASP script for transferring data from an Excel sheet to an Access table, some of the fields of which contain names which have an...
    4. How to Export to Excel?
      How can I export to a excel a datagrid? -- LUIS ESTEBAN VALENCIA MICROSOFT DCE 2. MIEMBRO ACTIVO DE ALIANZADEV
    5. Export to Excel C#
      Hi, I am having a problem exporting a Datagrid to excel in asp.net. For some reason I am getting a blank excel page. I set up in IIS the Mime for...
  3. #2

    Default Re: Export from Excel to Access using ASP in DWMX

    I recently had the problem with the apostrophe in Excel. What someone told me
    to do, and it worked, was to
    Copy a blank cell
    Select the column of cells with the extra apostrophe
    Paste Special, choose Value and Choose Add.

    What this does is add a "nothing" to the beginning of the cells which takes
    the apostrophe aways.

    What happens if you just do a "CSV" export and then import that file into
    Access?

    artsybrenda Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139