• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Insert an Image in a Csv file that changes the name from time to time|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Insert an Image in a Csv file that changes the name from time to time|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosInsert an Image in a Csv file that …
sp_PrintTopic sp_TopicIcon
Insert an Image in a Csv file that changes the name from time to time
Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
1
May 28, 2021 - 3:34 am
sp_Permalink sp_Print

Hello everybody
My Problem is this:
On an excel sheet I created a function that creates and exports the file in Csv format to my sub-folder called (attachments)
And so far everything is ok
Now what I would like to know and be able to solve would be to insert in the (Csv) also the image that is in the excel sheet; As it gives me everything except the image
Therefore I ask you if there was a way to upload this image as well. Thanks
Greetings from A.Maurizio

(P.s)
My code is the following:

Sub Crea_Formato_In_Csv() On Error GoTo 1 Dim NomeFile As String Dim Estensione As String Dim shapes As Shape NomeFile = Foglio1.Range("M1").Value Estensione = Foglio1.Range("M2").Value Last_Row = Foglio1.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row Last_Col = Foglio1.Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column Call ExportRangeAsDelimitedText(ThisWorkbook.Name, _ "Foglio1", Range("A1:D25"), ThisWorkbook.Path & "\Allegati\" & NomeFile & Estensione, ";", True, True, False) Call ExportRangeAsDelimitedText(ThisWorkbook.Name, Sheets("1.Csv"), shapes("Rettangolo 1").Picture, _ LoadPicture(ThisWorkbook.Path & "\Base_Image\Image_Base.jpg", ";", True, True, False)) MsgBox "Fatto!" 1: End Sub

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1807
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
May 28, 2021 - 12:47 pm
sp_Permalink sp_Print

A CSV is a text file: you cannot have anything else except text in a csv, no images, no formatting, no objects.

Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
3
May 29, 2021 - 3:21 am
sp_Permalink sp_Print

Hi Catalin Bombea how are you?
Everything good.
Thanks for your clarification and professionalism
Maq not only imagined it, but last night I did not have direct confirmation, as after having perfected my project in all its parts.
I tried to do the most trivial thing that could be done, which was to manually put that image and then save it that way.
And I made them the discovery that in the moment in here I pressed the save as button.
Punctually I got a writing that explained in broad outline what you just said.
With two Options: If I pressed yes, I kept the Original Format.
What if I pressed No; Which I then did.
I could have saved everything in another format with image.
What is basically an Excel sheet and no longer Csv that's all.
But it doesn't matter, that's fine!
The important thing is not only to have understood everything; But also how to create all the various formats in a single project.
Thanks for your interest. Sali da A.Maurizio

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1807
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
4
May 29, 2021 - 3:26 am
sp_Permalink sp_Print

Punctually I got a writing that explained in broad outline what you just said.

What do you mean? Where do you got the writing from?

Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
5
May 30, 2021 - 3:49 pm
sp_Permalink sp_Print

Nothing important
the message comes out due to the error evaluator.
So when I tried to manually insert the image into the newly created Csv File, and then I tried to save everything again.
This office error check explained to me that it was not possible to save a csv with an embedded image; As he was just a text file.
Pero 'Pressing yes: I could have saved the file without image
While if I had pressed the No key I could have saved everything with the embedded image; But doing so would have changed the Format from Csv to Excel
That's all

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Shanna Henseler
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6210
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31888
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.