SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Is it possible to set the csv text alignment

    Hi,guys,
    Is it possible to set the csv text alignment,I don't see a way to do this

    Well,Let me explain it in details. I'm doing a project,so I need to write a function to export csv files.
    It works well,but the client require the text to be aligned on left and top.currently,text aligns center,which make it looks jumbled.

    30627173756.png

    i hope u got me there...

    Best regards

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,237
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    To my knowledge there isn't a way to give that much detail in a CSV. However, once the CSV is imported, the client simply needs to press Ctrl+A to select all cells, and then right-click on any Cell, go to Formatting, and set the alignment to top left.

  3. #3
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok,thanks. since there isn't a way to give that much detail in a CSV,I'll feedback to my client about this.

  4. #4
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,237
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Keep in mind, CSV is simply a comma separated list of values, it doesn't provide any formatting. The client looks to be importing it into another program/application (either Excel or some derivative of Excel). That piece of software may have defaults that can be updated, or as I previously stated, he should be able to select ALL of the cells containing data and assign the specific alignment he wants that way.

    Best of luck. Worse case scenario, if he is using Excel, you could always create a macro that does these steps for him at the push of a button, but I've only ran into once situation where that became a necessary step (hopefully it isn't one for you).

  5. #5
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank u very much for ur replay.
    By the way,is there any living chat rooms/groups for php recommend??

  6. #6
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    go to irc channel #php on freenode. thats the best chat place for php

  7. #7
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could u plz give me the link,thankx

  8. #8
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gyrate360 View Post
    Could u plz give me the link,thankx
    You need to use an irc chat client. I use pidgin.
    Connect to irc.freenode.net and channel #php
    Last edited by silv3r.m00n; Jun 27, 2013 at 22:50. Reason: correction

  9. #9
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thankx


Bookmarks

Posting Permissions

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