ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Lakshmana
    3. Best
    • Profile
    • Following 66
    • Followers 3
    • Topics 313
    • Posts 1,763
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Mail Allignment Issue

      @dafyre said in Mail Allignment Issue:

      $filename = 'file.xlsx'
      $From ="[email protected]"
      $to = "[email protected]"
      $SMTP= "mail.domain.com"
      $filepath = "C:\Location$filename"

      $excel = New-Object -comobject Excel.Application
      $ReportWorkBook = $excel.Workbooks.Open($filePath)
      $excel.Visible = $false
      $ws = $ReportWorkBook.Worksheets.Item(1)
      $SelectedRange = $ws.UsedRange
      $SelectedRange.Copy()
      #$newmail.GetInspector.WordEditor.Range().Paste()

      $body = @"

      My email content goes here

      "@

      #initate message
      $email = New-Object System.Net.Mail.MailMessage
      $email.From = $emailFrom
      $email.To.Add($emailTo)
      $email.Subject = $subject
      $email.Body = $body

      #initiate email attachment
      $emailAttach = $SelectedRange.Paste()
      $email.Attachments.Add($emailAttach)

      #initiate sending email
      $smtp = new-object Net.Mail.SmtpClient($smtp)
      $smtp.Send($email)

      Exception calling "Add" with "1" argument(s): "Value cannot be null.
      Parameter name: item"
      At C:\Reports\excel.ps1:26 char:1
      + $email.To.Add($emailTo)
      + ~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ArgumentNullException
       
      Method invocation failed because [System.__ComObject] does not contain a method named 'Paste'.
      At C:\Reports\excel.ps1:31 char:1
      + $emailAttach = $SelectedRange.Paste()
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (Paste:String) [], RuntimeException
          + FullyQualifiedErrorId : MethodNotFound
       
      Exception calling "Add" with "1" argument(s): "Value cannot be null.
      Parameter name: item"
      At C:\Reports\excel.ps1:32 char:1
      + $email.Attachments.Add($emailAttach)
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ArgumentNullException
       
      Exception calling "Send" with "1" argument(s): "A recipient must be specified."
      At C:\Reports\excel.ps1:37 char:1
      + $smtp.Send($email)
      + ~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : InvalidOperationException
      
      posted in IT Discussion
      LakshmanaL
      Lakshmana
    • Linux Background Service

      Whether my machine is going for the CPU utilization for the crypto watch service since i have noticed in my machine today that new loop is being present in the machine which i am not aware of before

      NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
      loop1     7:1    0  83.8M  1 loop /snap/core/3748
      sr0      11:0    1  1024M  0 rom  
      loop2     7:2    0  81.3M  1 loop /snap/core/3887
      loop0     7:0    0   9.3M  1 loop /snap/cryptowatch/4
      

      What action should be taken from my end ?

      posted in IT Discussion linux
      LakshmanaL
      Lakshmana
    • RE: Extract Data from .csv file with Python

      @scottalanmiller said in Python with Excel Auto Filter and Extract Data:

      @lakshmana said in Python with Excel Auto Filter and Extract Data:

      I am new to Python but need to autofilter the data from the excel sheet according to the Engineer name and Age of the tickets in the excel.

      Two things here then are a problem.

      1. It is not an Excel file if it is CSV. So this changes the question completely. It's about CSV files.
      2. You don't do this in Excel, you just use Python.

      So the question should be "how to extract data from text file with Python". Extremely different than the question asked.

      I will try with .csv file and then convert that file into excel by powershell

      posted in IT Discussion
      LakshmanaL
      Lakshmana
    • Excel Automation

      I having a Excel file with some data.The sheet1 and sheet2 are there.The sheet2 have data and sheet1 have the formula to filter the data.I have done the formula upto 502 numbers the data which i have is 10 number after 10 all the values are zero i need to get only the value which is not having the value zero in it.How to make a new excel file to copy only the data which is not having the value Zero in it.

      This can be done in Powershell or Python ?

      posted in IT Discussion excel
      LakshmanaL
      Lakshmana
    • Ebook Convertor Help

      This is another long time.I am in need of help for the Ebook conversion.I have a Kindle device which support .mobi files.The files are more in .epub format which does not supports in the kindle.So I have downloaded Calibre and tried converting these epub into .mobi format but the books are not coming with the correct data which was present in the .epub

      OS : Zorin OS
      Software User : Calibre for Ebook Conversion
      Request : Convert .epub into .mobi files to work in my kindle
      Help : Any person using any other software to convert the books ?If so please provide the details

      posted in IT Discussion
      LakshmanaL
      Lakshmana
    • Check_MK Monitoring tool

      Hi All,

      I am trying to install and create a slack notification through Check_mk monitoring tool.Anyone have tried already with this monitoring tool to send their slack notification to your slack channel with the alerts from the network devices or from servers ?

      posted in IT Discussion
      LakshmanaL
      Lakshmana
    • 1 / 1