Results 1 to 2 of 2

Thread: Copy Range From .xlsm to .xlsx

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2018
    Posts
    11

    Copy Range From .xlsm to .xlsx

    Hello,

    I've searched online but could not find something for VS, only VBA but even then the comment say it didn't work.

    My main code opens workbook "X". which is macro-enabled (.xlsm), exports some values in column A of sheet "DataGridView". I then save and close "X".

    I have also created another workbook "Y" (.xlsx) with only one sheet ("Sheet1").

    I want to paste the entire column A from "X" onto column A in "Y".

    Please note I do not want to use Interop as it messes up my code when I import it; my current preferences are:

    Option Strict Off
    Imports System.IO
    Imports System.Globalization
    Imports System.Text
    Imports System.Net.Mail
    Imports Microsoft.Office

    So please whatever you suggest, it should work with these.

    Thank you

  2. #2
    Addicted Member
    Join Date
    May 2017
    Location
    Italy
    Posts
    170

    Re: Copy Range From .xlsm to .xlsx

    My suggestion:
    open workbook "X"
    export some values in column A of sheet "DataGridView"
    save sheet "DataGridView" only as "Y.xlsx"

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width