w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
combining two excel sheets into one by using few columns as key
You need to clarify you problem a bit. Are you looking to add just the three columns (city,street name, street number) to your existing worksheet? If so, what you need to do is identify the column numbers that corresponds to your three input columns in the input sheet. Then you write a loop looping through all cells in these column. In each loop you will try to find the values in your existing sheet. If not found append to the end of your existing sheet. If found, check each of the three columns for a blank cell and overwrite the value. Lets say street name is the cell that will always have a value in your existing sheet. existing sheet (street name = column 1, street number = column 2, city = column 3) input sheet (street name = column 30, street number = column 31, city = column 1) th

Categories : Excel

How to obtain all combinations of the columns of a data frame taken by 2?
> combn(names(X.df),2,simplify=FALSE) [[1]] V1 V2 1 2 4 2 5 7 3 3 5 4 4 5 5 3 6 6 4 5 [[2]] V1 V3 1 2 3 2 5 1 3 3 8 4 4 1 5 3 1 6 4 6 [[3]] V1 V4 1 2 1 2 5 2 3 3 2 4 4 1 5 3 3 6 4 1 [[4]] V2 V3 1 4 3 2 7 1 3 5 8 4 5 1 5 6 1 6 5 6 [[5]] V2 V4 1 4 1 2 7 2 3 5 2 4 5 1 5 6 3 6 5 1 [[6]] V3 V4 1 3 1 2 1 2 3 8 2 4 1 1 5 1 3 6 6 1

Categories : R

Creating combinations from multiple columns in data set in SAS
Seems like the best way to do this is to transpose your original dataset to one column, then join it to itself using a cartesian join (or any of the other methods mentioned in the paper you posted). As long as you want the combination of everything with everything else or some subset, the vertical transpose is very easy. Then just remove the combinations you don't want using WHERE; so for example if you want only cross-column combinations, your data looks like you could use SUBSTR to look at the 4th character ('A' 'B' 'C') and just remove any where they are equal.

Categories : Sas

Create new key for a data frame by combining different columns
Something like this? set.seed(42) DF <- data.frame(key1=sample(letters[1:2],10,TRUE), key2=sample(letters[1:2],10,TRUE), key3=sample(letters[1:2],10,TRUE)) DF <- within(DF,{newkey <- interaction(key1,key2,key3,drop=TRUE) levels(newkey) <- paste0("key",seq_along(levels(newkey))) }) # key1 key2 key3 newkey # 1 b a b key4 # 2 b b a key2 # 3 a b b key5 # 4 b a b key4 # 5 b a a key1 # 6 b b b key6 # 7 b b a key2 # 8 a a b key3 # 9 b a a key1 # 10 b b b key6

Categories : R

Combining data from two tables in Excel 2010
You can run a VLOOKUP on the second column with a modified lookup value: Assuming that the big table is in Sheet2, the small one in Sheet1, there are no headers and the digits are both in column A of their respective sheet, put this in Sheet2, cell B1: =VLOOKUP(LEFT(A1, 4)*1, Sheet1!A:A, 1, 0) And drag the formula down till the end of the table. All those that have #N/A means there is no match in the smaller table. Otherwise, the matched digit will be returned. EDIT: To explain my edit, LEFT(A1, 4) returns a text value, to convert the digit back to a number, multiply by 1.

Categories : Excel

MySQL Combining data from columns with identical names
You need to sort after creating the union. SELECT * FROM (SELECT item_name, date FROM Videos WHERE item_active = 1 UNION SELECT item_name, date FROM Photos WHERE item_active = 1) x ORDER BY date DESC

Categories : Mysql

Combining all combinations of two lists into a dict of special form
[{k:v for k,v in itertools.izip('ab', comb)} for comb in itertools.product([1,2,3,4], [6,7])] >>> import itertools >>> [{k:v for k,v in itertools.izip('ab', comb)} for comb in itertools.product([ 1,2,3,4], [6,7])] [{'a': 1, 'b': 6}, {'a': 1, 'b': 7}, {'a': 2, 'b': 6}, {'a': 2, 'b': 7}, {'a': 3 , 'b': 6}, {'a': 3, 'b': 7}, {'a': 4, 'b': 6}, {'a': 4, 'b': 7}]

Categories : Python

How to set data in columns accordingly in excel sheet
The columns in the excel sheet are calculated based on the left and right coordinate of every textbox or other control in the sheet. So the only real way to influence the columns in the excel sheet is to very carefully make sure that all the textboxes or other items in the report are precisely aligned - especially their left/x position.

Categories : C#

how to get the combinations of three columns of a table in pl/sql?
A cartesian join will produce all the combinations you are looking for. As all three columns are in the same table, you need to split the table temporarily into three pieces: SELECT * FROM (SELECT a FROM mytable), (SELECT b FROM mytable), (SELECT c FROM mytable);

Categories : Database

Comparing Columns and Highlight the Matching Data Using Excel VBA
you can do it like this Sub CompareAndHighlight() Dim rng1 As Range, rng2 As Range, i As Long, j As Long For i = 1 To Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Row Set rng1 = Sheets("Sheet2").Range("B" & i) For j = 1 To Sheets("Sheet3").Range("C" & Rows.Count).End(xlUp).Row Set rng2 = Sheets("Sheet3").Range("C" & j) If StrComp(Trim(rng1.Text), Trim(rng2.Text), vbTextCompare) = 0 Then rng1.Interior.Color = RGB(255, 255, 0) End If Set rng2 = Nothing Next j Set rng1 = Nothing Next i End Sub the code checks all cells in Sheet2 column B against each cell from Sheet3 column C and if they match it highlights cells on Sheet2 in Column B in yellow

Categories : Vba

Excel Interop - How to get the used range data with first unused columns?
I have got a solution, it may help someone. Excel.Range excelCell = xlWorksheet.UsedRange; Excel.Range oRng = xlWorksheet.get_Range("A1").SpecialCells(Microsoft.Office.Interop.Excel.XlCellType.xlCellTypeLastCell); int lLastCol = oRng.Column; int colCount = excelCell.Columns.Count; int firstEmptyCols = lLastCol - colCount;

Categories : C#

Excel: Macro needed - 2 columns of data to become 1 column "every other"
This should work, but you'll have to adjust a little for your exact layout and needs. Sub mergeColumns() Dim mergedData As Variant ReDim mergedData(1 To 600) dataToProcess = Range("A2:B301") For i = 1 To 300 mergedData(i * 2 - 1) = dataToProcess(i, 1) mergedData(i * 2) = dataToProcess(i, 2) Next i Range("B2:B601") = WorksheetFunction.Transpose(mergedData) End Sub

Categories : Excel

Excel vba Create combinations in same row each one
Here is a way to do it: In your excel sheet, add an array formula like this: A B C D E 1 2 A B C D {=k_combinations(CONCATENATE(A2;B2;C2;D2);3)} 3 E F G H {=k_combinations(CONCATENATE(A3;B3;C3;D3);3)} Note that you should extend the array formula to columns F, G, H and so on so that you get all results. (The { and } are not to be inserted manually, they are the mark of the array formula) : Select cells E2, F2, G2, H2, and so on to Z2 Type the formula To validate input, press Ctrl+Shift+Enter Put the following code into a code module. Public Function k_combinations(ByVal chLetters As String, ByVal k As Long) As Variant Dim chCombinations() As String Dim uCount As Long Dim vReturn() As Variant Dim i As Long uCount =

Categories : Vba

return all possible combinations of values in columns in SQL
As the link you provided had a good answer, modified below select distinct t1.C1, t2.C2, t3.C3, t4.C4 from MyTable t1, MyTable t2, MyTable t3, MyTable t4

Categories : Sql Server

Import data file from folder image to excel columns
Sub tgr() Const strFolderPath As String = "C:Test" Dim rngDest As Range Dim oShell As Object Dim varFileName As Variant Dim strDimensions As String Set oShell = CreateObject("Shell.Application").Namespace(strFolderPath) Sheets.Add With Range("A1:B1") .Value = Array("Name", "Dimensions") .Font.Bold = True .Borders(xlEdgeBottom).LineStyle = xlContinuous End With Set rngDest = Range("A2") On Error Resume Next For Each varFileName In oShell.Items strDimensions = oShell.GetDetailsOf(varFileName, 26) If Len(strDimensions) > 0 Then With rngDest .Resize(, 2).Value = Array(varFileName, strDimensions) .Comment.Delete .AddComment .

Categories : Image

How to save a data frame in a txt or excel file separated by columns
You should be able to do this with write.csv(). This is an example that works on my machine. I create a data.frame, save it with write.csv, and open it in Excel without issue. a <- 1:5 b <- 6:10 c <- 11:15 df <- data.frame(a,b,c) write.csv(df, 'test2.csv')

Categories : R

Copying Data with Skipped Columns From Excel and Pasting into DataGridView
Unfortunately excel just copies everything not just your selected columns for outside world. You can view what is copied to the clipboard using a clipboard viewer (I've used Free Clipboard Viewer). I've created a worksheet with following 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6 and selected and copied columns 2, 4 and 6. clipboard viewer shows me what I've copied not three columns but all columns from 2 to 6 (actually Sheet!C2:C6). You can always open excel using interop or 3rd party component and get what you need and paste it manually which I had to do for converting a grid to excel like grid. I manually parsed comma separated values and set the cells individually.

Categories : C#

Using Macro to generate combinations over multiple columns
This is working VB-Code, I assume you will be able to put the results into excel-cells yourself... :) Private Sub Form_Load() 'This is the call that inits the recursion CombineNumbers 20, 6 End Sub Private Function CombineNumbers(Num_Elements As Long, Num_Selected As Long) As String() Dim Buff() As String ReDim Buff(BinomCoeff(Num_Elements, Num_Selected) - 1) CombineNumbersRecursion 1, Num_Elements, Num_Selected, Buff, 0& Dim Value For Each Value In Buff Debug.Print Value Next Value End Function Private Sub CombineNumbersRecursion(Start_Element As Long, End_Element As Long, _ Num_Selected As Long, Buff() As String, BuffStartIndex As Long, _ Optional CurrStr As String = vbNullString) If (Num_Selected) Then 'Recursion

Categories : Vba

Excel 2010 comparing multiple columns (2 columns to 2 other columns)
Here is a User Defined Function that will perform a 2 column lookup. Treat it like a vlookup. LookupPair is a pair of cells. (C2:D2) in your example. Anything other that a pair of side-by-side cells will cause an error. LookupRange is the columns that include both the matching pair columns and the return column. Something like (I1:K101) in your example. LookupRange must contain at least two columns or an error is generated. ReturnCol is the column number in LookupRange that contains the value to be returned. (same as Col_index_num in a vlookup). The function only does exact matches. Function DoubleColMatch(LookupPair As Range, LookupRange As Range, ReturnCol As Integer) As Variant Dim ReturnVal As Variant Dim Col1Val As Variant Dim Col2Val As Variant Dim x As Long If LookupPair.R

Categories : Excel

Excel VBA macro to generate a list of possible combinations
You can use the following to cross join two different ranges. It will handle ranges of any size and write the crossjoined combinations to a target sheet that you specify. In the example below, I have defined two named ranges: newValues and fixedValues. Both of these ranges are on Sheet1. I then loop through the ranges and write all combinations to Sheet2. Sub CrossJoinMyRanges() Dim ws As Worksheet Dim newValues As Range Dim cell As Range Set ws = ThisWorkbook.Sheets("Sheet1") Set newValues = ws.Range("newValues") ' loop through the new values For Each cell In newValues Call ReplaceMe(cell.Value, ws) Next cell End Sub Sub ReplaceMe(replacement As String, ws As Worksheet) Dim fixedValues As Range Dim cell As Range Set fixedValues = w

Categories : Excel

Check that all combinations occur equally often for specified columns of a dataframe
checkAllCombosOccurEquallyOften<- function(df,colNames,dropZeros=FALSE) { #in data.frame df, check whether the factors in the list colNames reflect full factorial design (all combinations of levels occur equally often) # #dropZeros is useful if one of the factors nested in the others. E.g. testing different speeds for each level of # something else, then a lot of the combos will occur 0 times because that speed not exist for that level. #but it's dangerous to dropZeros because it won't pick up on 0's that occur for the wrong reason- not fully crossed # #Returns: # true/false, and prints informational message # listOfCols <- as.list( df[colNames] ) t<- table(listOfCols) if (dropZeros) { t<- t[t!=0] }

Categories : R

Iterate over all pairwise combinations of numpy array columns
If you don't want to use recursion you should generally be using itertools.combinations. There is no specific reason (afaik) why this should cause your code to run slower. The computationally-intensive parts are still being handled by numpy. Itertools also has the advantage of readability.

Categories : Python

R combining date columns
I'm sure there are more "correct" ways to do this, but this is what came to my mind quickly. First, convert "startdate" and "enddate" to date objects data$startdate <- as.Date(data$startdate, format="%d-%b-%y") data$enddate <- as.Date(data$enddate, format="%d-%b-%y") Then, use seq to create the date sequence, and manually recreate your data.frame. Use `do.call(rbind, ...) to put it back together. ddd <- do.call(rbind, lapply(sequence(nrow(data)), function(x) { data.frame(toolid = data$toolid[x], date = seq(data$startdate[x], data$enddate[x], by = 1), stage = data$stage[x]) })) ddd # toolid date stage # 1 abc 2013-01-01 production # 2 abc 2013-01-02 production # 3 abc 2013-01-03 production # 4 abc 2013-01-04 productio

Categories : R

Joining two tables without combining columns
You need to add an ON condition to your remark join and get rid of that CROSS JOIN. For instance you could do: LEFT OUTER JOIN remark as cp_remark ON cp_remark.id = main_party.id OR cp_remark.id = pey_party.id OR cp_remark.id = rec_party.id On a side note, a few recommendations: Don't use SELECT * unless you are writing a query for your own consumption. Your code should show you what data you are using, only include it in the result set. It is personal preference, but I have always found putting your joins on the left is a lot easier than putting them on the right. Order your JOIN in a more logical fashion, your second JOIN requires data from your seventh, try to add detail as you go. You are joining way too many tables, you don't need to join everything that has a foreign key, on

Categories : SQL

SQL combining 2 unique columns by random
Here is an approach. For each banner_id randomly select a possible zone (from the data). Then from the random zones chosen, randomly select a banner_id. At this point, you have a collection of distinct zones and banners. You can then get six of them: select thezone as zone_id, substring_index(group_concat(banner_id order by RAND()), ',', 1) as banner_id from (select banner_id, substring_index(group_concat(zone_id order by RAND()), ',', 1) as thezone from banner_to_zones b2z group by banner_id ) b order by rand() limit 6 There are some cases where this won't work. But assuming that you have enough zones and banners, then it should return six that are distinct on both banner and zone.

Categories : PHP

Combining concatenate and if in Excel formulas
I think this is what you're looking for: =IF('Unapplied Report'!A5="","",TEXT('Unapplied Report'!A5,"0000"))&IF('Unapplied Report'!C5="","",TEXT('Unapplied Report'!C5,"0000"))&IF('Unapplied Report'!D5="","",TEXT('Unapplied Report'!D5,"0000"))

Categories : Excel

Combining two small scripts in VBA for Excel
Well that ought to be pretty basic : Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Call Script1(Target) Call Script2(Target) End Sub Private Sub Script1(ByVal Target As Range) If Intersect(Target, Range("AE49")) Is Nothing Then Exit Sub Select Case Target.Value Case 1 Range("A50:A52").EntireRow.Hidden = False Range("A53:A55").EntireRow.Hidden = True Case 2 Range("A50:A53").EntireRow.Hidden = False Range("A54:A55").EntireRow.Hidden = True Case 3 Range("A50:A54").EntireRow.Hidden = False Range("A55").EntireRow.Hidden = True Case 4 Range("A50:A55").EntireRow.Hidden = False End Select End Sub Private Sub Script2(ByVal Target As Range) If Inters

Categories : Excel

SQL Programming combining 4 rows into 1 and adding 3 columns
There are probably better ways to do this but here's one way: select cast(datepart(yyyy, UTCTimethat) as varchar(4)) + '-' + cast(datepart(mm, UTCTimethat) as varchar(2)) + '-' + cast(datepart(dd, UTCTimethat) as varchar(2)) + ' ' + cast(datepart(hh, UTCTimethat) as varchar(2)) + ':00:000 - ' + cast(datepart(yyyy, UTCTimethat) as varchar(4)) + '-' + cast(datepart(mm, UTCTimethat) as varchar(2)) + '-' + cast(datepart(dd, UTCTimethat) as varchar(2)) + ' ' + cast(datepart(hh, UTCTimethat) as varchar(2)) + ':45:000' as HourTime, sum(case when Values is null then 1 else 0 end) as NoData, sum(case when Values = 0 then 1 else 0 end) as ZeroData from AllData where isnull(Values, 0) = 0 group by cast(datepart(yyyy, UTCTimethat) as varchar(4)) + '-' + cast(datepart(mm,

Categories : SQL

combining several tables of different types with common columns
It's an interesting question. If it were me, I'd use two tables: one for all the common properties and another for all the outlying properties of the users. Something like this: CREATE TABLE _UserProperties( ID int , Property varchar(1000) , Value varchar(1000) , UserID int ) ; insert into _UserProperties(id, property, value, userid) values (1,'employee id', '123556',1), (2,'CustomerID', '345677',2), (2,'SalesGroup', 'ABFD34',2), (2,'SalesToDate', '2344',2), (3,'Project', 'cat juggling',3); CREATE TABLE _Users( ID int , UserName varchar(50) , UserAddress varchar(1000) , UserType varchar(50) ) ; insert into _Users (ID, UserName, UserAddress, UserType) values (1,'Fred Jones','123 Mample','Customer'),

Categories : Sql Server

Combining values from multiple columns into one column
Your existing query is returning all levels in the join, because the only level selection is occurring in the where clause - if any level matches the criteria, then all levels are selected. Instead, try: select LevelTypeId, LevelId from ( select a.ID as [1], b.ID as [2], c.ID as [3], d.ID as [4] from A a left join B b on a.ID = b.A_ID and @levelTypeId >= 2 left join C c on b.ID = c.B_ID and @levelTypeId >= 3 left join D d on c.ID = d.C_ID and @levelTypeId >= 4 where (@levelTypeId = 4 and D.ID = @levelId) or (@levelTypeId = 3 and C.ID = @levelId) or (@levelTypeId = 2 and B.ID = @levelId) or (@levelTyp

Categories : SQL

Mysql Combining the values of multiple columns
If you just want to retrieve the data combined in that fashion: SELECT CONCAT( column1value, column2value, column3value, column4value, column5value ) column1value FROM my_table If you want to permanently update the data in the table: UPDATE my_table SET column1value = CONCAT( column1value, column2value, column3value, column4value, column5value ) If you furthermore want to remove the old columns: ALTER my_table DROP column2value, DROP column3value, DROP column4value, DROP column5value

Categories : Mysql

Excel VBA: hide/unhide columns in day-over-day tracker, skipping weekend columns
If your data has a row of Dates, you can indeed use Weekday(Cells(r,c)) to determine if its a weekend, then use Select Case to hide/unhide columns. The current can be retrieved by Date(). Then you can set to codes in Sub Workbook_Open() in ThisWorkbook object. So when the file is opened, it runs the code so today and 9 previous days are not hidden. EDIT: Add these 2 sub into "ThisWorkbook" object, change as per your sheet name, row and column. If you are to want 9 previous "Weekdays", then you will have to change the Case or use different approach to determine whether a column should be hidden or not. This is as far as I will go. Good luck! Sub Workbook_Open() ShowTodayPlusPrevious End Sub Private Sub ShowTodayPlusPrevious() ' Assuming Row 1 contains the dates, stating from co

Categories : Vba

Combining multiple columns by rows resultig from a for-loop
The problem of the repetition of the result for the last fishery index data is due to the variable j. For each value of i, all values of j are used. Hence, in each run of the outer for loop, the data of the preceding run are replaced by the new data associated with the current fishery index. Here is a more efficient approach with tapply: lagging <- function(df, col, dimension = 5) { setNames(as.data.frame(do.call(rbind, tapply(df[[col]], df$fishery, embed, dimension))), paste0("L", seq(dimension - 1, 0))) } lagging(lob, 3)

Categories : R

combining 2 select statements with different number of columns, where 1st statement is already using JOIN
As AJP said you can just do this: SELECT s.id, a.subject,a.sent, s.date_sent, m.sam_subject, (SELECT COUNT(id) FROM tbl_something WHERE schedule_id = s.id) AS total_recipients FROM tbl_something2 AS s INNER JOIN tbl_something3 AS m ON s.message_id = m.sam_msg_id INNER JOIN ( SELECT * FROM sms_something4 WHERE status = '0' ORDER BY id DESC ) a on a.subject = m.sam_subject and a.date_sent = s.date_sent ORDER BY s.date_sent DESC

Categories : Mysql

Combining Multiple Columns from the Same Table Into 1 Longer Unique Column?
Please use this: http://sqlfiddle.com/#!2/bcc34/12 SELECT DISTINCT PARTS.PART, CASE WHEN PARTS.PART=T.PART3 THEN 'TRUE' ELSE NULL END AS PART3, CASE WHEN PARTS.PART=T.PART2B THEN 'TRUE' ELSE NULL END AS PART2B, CASE WHEN PARTS.PART=T.PART2T THEN 'TRUE' ELSE NULL END AS PART2T, CASE WHEN PARTS.PART=T.PART1 THEN 'TRUE' ELSE NULL END AS PART1 FROM ( SELECT Part3, Part2B, Part2T, Part1, Scope, Type, Name, Comment FROM TEST_ISO ) T JOIN ( SELECT PART3 AS PART FROM TEST_ISO UNION SELECT PART2B FROM TEST_ISO UNION SELECT PART2T FROM TEST_ISO UNION SELECT PART1 FROM TEST_ISO) PARTS ON T.PART3=PARTS.PART OR T.PART2B=PARTS.PART OR T.PART2T=PARTS.PART OR T.PART1=PARTS.PART If you do not want the NULL you can change the ELSE NULL as ELSE '' Here is my result: PART PAR

Categories : SQL

Insert Columns between columns in excel
reposting the above comment as an answer so question may be marked as answered. Please see: Adding a new column at the start of an excel table in an excel for solution. All you need do is change the "A1" value to the column you wish to insert before ("D1" in your example)

Categories : C#

Using Excel to create part numbers based on 4 levels of categories that each have unique identifiers based on the category combinations
Personally I'd place another column right of "Part Number" labeled "Part ID". Place the following into the cell and drag it down to copy the code with the relative cell references. =H2 & COUNTIF($H$2:H2,H2)

Categories : PHP

Python all combinations of data
You should use the itertools library. You want to generate all unique permutations of each element in the powerset. Some code might look like from itertools import permutations, combinations, chain # Taken from itertools page, but edited slightly to not return empty set def powerset(iterable): "powerset([1,2,3]) --> (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)" s = list(iterable) return chain.from_iterable(combinations(s, r) for r in range(1, len(s)+1)) Then In [1]: s = ('A', 'B', 'C') In [2]: [j for i in powerset(s) for j in permutations(i)] Out[2]: [('A',), ('B',), ('C',), ('A', 'B'), ('B', 'A'), ('A', 'C'), ('C', 'A'), ('B', 'C'), ('C', 'B'), ('A', 'B', 'C'), ('A', 'C', 'B'), ('B', 'A', 'C'), ('B', 'C', 'A'), ('C', 'A', 'B'), ('C', 'B', 'A')]

Categories : Python

Combinations test data
With the brand new Python 2.6, you have a standard solution with the itertools module that returns the Cartesian product of iterables : import itertools print list(itertools.product([1,2,3], [4,5,6])) [(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6)] You can provide a "repeat" argument to perform the product with an iterable and itself: print list(itertools.product([1,2], repeat=3)) [(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2), (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)] You can also tweak something with combinations as well : print list(itertools.combinations('123', 2)) [('1', '2'), ('1', '3'), ('2', '3')] And if order matters, there are permutations : print list(itertools.permutations([1,2,3,4], 2)) [(1, 2), (1, 3), (1, 4), (2, 1), (2, 3), (2,

Categories : Testing

PHP and FPDF - sprintf not working with data in certain combinations
I think you forget to add this line $text = sprintf("%s %s %s %s", $lineOne, $lineTwo, $lineThree, $lineFour); $pdf->Add_Label($text); If you don't want to use sprintf(), you can print line by line like that $pdf->Add_Label($lineone); $pdf->Add_Label($linetwo); Try this option $pdf->Write(0.2,$lineone); $pdf->Write(0.2,$linetwo);

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.